Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Add or remove template or reference
ERASER_MCP_ADD_OR_REMOVE_TEMPLATE_OR_REFERENCEAttach or detach an EXISTING file as a template (style anchor) or reference (terminology/concept anchor) of a preset. Use this tool when: - the user has an existing workspace they want to promote into a preset (e.g. 'use this file as a template for the System Design preset'), - you need to detach a file from a preset, - or you just created a template via `create_template_or_reference` WITHOUT a `presetId` and need to attach it now. To create a NEW template/reference file and attach it in a single call, use `create_template_or_reference` with `presetId` set — that avoids leaving a detached file in the team. When removing a file leaves it orphaned from all presets, the file is archived automatically. Templates and references are inherently team-scoped (no private/personal templates exist); the preset choice is the only scoping decision.
Create diagram
ERASER_MCP_CREATE_DIAGRAMPREFERRED for creating a diagram from a natural-language prompt — Eraser's AI picks the diagram type, generates the DSL, and renders it. DO NOT pre-classify the user's request into a diagram type yourself. Pass `text` only (plus destination params) and LEAVE `diagramType` UNSET unless the user EXPLICITLY named a type (e.g. 'make this a sequence diagram', 'use a cloud architecture diagram'). Eraser's render service has type-specific heuristics and will pick a better type from the prompt than your guess will, especially on ambiguous asks like 'show how X works' or 'diagram the architecture'. BEFORE calling this tool, if the user has not already specified the destination, ASK them these questions (skip any the user has already answered): 1. 'Should I create a new file for this diagram, or add it to an existing file?' — if existing, ask which fileId (or use one they just referenced). 2. If NEW file: 'Should the file be private (just for you) or shared with your team in a folder?' 3. If shared in a folder: 'Which folder?' (or offer to place it at the team root). Do NOT call list_folders or get_folder to invent a destination yourself — ask the user. Pick destination params based on the answers: - Existing file → pass targetFileId - New private file → omit targetFileId, omit folderId, do NOT set isTeamFile - New shared file at team root → omit targetFileId, omit folderId, set isTeamFile: true - New shared file in a folder → omit targetFileId, pass folderId (this implies shared) Returns the new diagram's id in the `diagrams[].id` field so a follow-up update_diagram/manually_update_diagram call does NOT need a list_diagrams round-trip. Prefer over manually_create_diagram unless you already have hand-written DSL/JSON.
Create document
ERASER_MCP_CREATE_DOCUMENTPREFERRED for populating a document from a natural-language prompt — Eraser's AI generates the markdown. Only callable on a file with an empty document body; if the file already has content, this returns an error and you should call update_document (for natural-language edits) or manually_update_document (to replace verbatim) instead. Prefer over manually_create_document unless you have pre-written markdown to insert verbatim.
Create file
ERASER_MCP_CREATE_FILECreate an empty file, or duplicate an existing file when sourceFileId is provided. Never populates content from a prompt — use create_document/create_diagram for AI generation. BEFORE calling this tool, if the user has not specified destination, ASK: 1. 'Should the file be private (just for you) or shared with your team in a folder?' 2. If shared in a folder: 'Which folder?' (or offer to place it at the team root). Do NOT call list_folders to invent a destination — ask the user. Pick params: - Private file → omit folderId, do NOT set isTeamFile - Shared at team root → omit folderId, set isTeamFile: true - Shared in a folder → pass folderId (this implies shared)
Create folder
ERASER_MCP_CREATE_FOLDERCreate a new folder.
Create preset
ERASER_MCP_CREATE_PRESETCreate a new preset (the team-level container for AI styling: templates, references, and rules). After creating, the typical next steps to make the preset useful are: 1. Add example files as templates/references via `add_or_remove_template_or_reference` (or `create_template_or_reference` to spin up a fresh template file from a prompt). Templates anchor the visual style; references anchor terminology and concepts. 2. Set the preset's rules via `update_rules` (e.g. 'always use dark backgrounds', 'prefer sequence diagrams for auth flows'). 3. Optionally mark the preset as the team default by calling `update_preset` with `isDefault: true`. This tool only creates the empty preset shell; an agent that stops here will produce a preset with no styling power. Chain the steps above unless the user explicitly only wanted the shell.
Create template or reference
ERASER_MCP_CREATE_TEMPLATE_OR_REFERENCECreate a new template (style anchor) or reference (terminology/concept anchor) file and, when `presetId` is provided, attach it to that preset in a single call. Auto-publishes the file's first version. Templates and references are ALWAYS team-scoped resources under AI Presets — there is no concept of a private/personal template or reference. DO NOT ask the user 'team template or private template?' — that is not a real choice. The only sharing question is which preset to attach it to. Typical use: - User says 'make this a template under <preset>' → pass `presetId` so the file is attached immediately. - User says 'make a template from this file' without naming a preset → ASK them which preset before calling (or list_presets to show options). DO NOT silently omit `presetId`; an unattached template is invisible to AI generation and almost never what the user wanted. - User says 'duplicate this file as a template' → pass `sourceFileId` (and `presetId`). When `presetId` is omitted the response includes a warning that the file is detached; treat that as a signal to follow up with `add_or_remove_template_or_reference` rather than leaving it dangling.
Delete diagram
ERASER_MCP_DELETE_DIAGRAMDelete a diagram from a file.
Delete document
ERASER_MCP_DELETE_DOCUMENTClear a file's document body to an empty markdown document.
Delete file
ERASER_MCP_DELETE_FILEArchive a file.
Delete folder
ERASER_MCP_DELETE_FOLDERDelete a folder. Rejects when the folder is not empty.
Delete preset
ERASER_MCP_DELETE_PRESETDelete a preset. Rejects when the preset has any rules, templates, or references.
Export diagram
ERASER_MCP_EXPORT_DIAGRAMRender a canvas diagram to PNG or JPEG and return a temporary image URL. Tell the user to download it from the returned imageUrl. Set format: "drawio" instead to export an editable draw.io (diagrams.net) document — that returns fileUrl rather than imageUrl; download it and save it with a .drawio extension. draw.io export requires a paid plan; on a free team it returns an upgrade error, so fall back to png/jpeg.
Export document
ERASER_MCP_EXPORT_DOCUMENTExport a file's markdown document body as a downloadable artifact.
Export file
ERASER_MCP_EXPORT_FILEReturns the Eraser file URL for PDF export. NOTE: programmatic PDF export is not yet available via MCP — this returns a link for the user to export from the Eraser app's export menu, not a downloadable PDF. For a diagram image, use export_diagram; for the document body as markdown, use export_document.
Get diagram
ERASER_MCP_GET_DIAGRAMFetch a diagram's metadata and DSL/JSON code. For freeform diagrams, set includeFreeformDefinition: true to get the full scene structure (elements, connections, titles). Need a PNG image of the diagram? Use export_diagram instead.
Get document
ERASER_MCP_GET_DOCUMENTFetch the full markdown body of a file's document.
Get file
ERASER_MCP_GET_FILEFetch a file's metadata, document outline (headers), and the list of diagrams in it.
Get folder
ERASER_MCP_GET_FOLDERFetch a folder by id.
Get me
ERASER_MCP_GET_MEFetch the current user, active team, and team memberships.