> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Eraser MCP

> Eraser MCP lets agents generate, create, read, search, update, export, and organize technical diagrams and documents in an Eraser workspace.

![Eraser MCP logo](https://mintcdn.com/composio-preview/r7CO9m4_UWMVFnU7/images/toolkits/eraser_mcp.svg?fit=max\&auto=format\&n=r7CO9m4_UWMVFnU7\&q=85\&s=068052384c846d80b21ea23c5d1375df)

* **Category:** model context protocol
* **Auth:** DCR\_OAUTH
* **Composio-managed OAuth available?** No
* **Tools:** 42
* **Triggers:** 0
* **Slug:** `ERASER_MCP`
* **Version:** 20261018\_00

## Tools

> [accordion] Add or remove template or reference
>
> **Slug:** `ERASER_MCP_ADD_OR_REMOVE_TEMPLATE_OR_REFERENCE`
>
> Attach 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.
>
> #### Input Parameters
>
> **kind** `string ("template" | "reference")` *required*
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string` *required*
>
> **operation** `string ("add" | "remove")` *required*

> [accordion] Create diagram
>
> **Slug:** `ERASER_MCP_CREATE_DIAGRAM`
>
> PREFERRED 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.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> **theme** `string ("light" | "dark")`
>
> **title** `string`
>
> **format** `string ("png" | "jpeg")`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **styleId** `string`
>
> **folderId** `string`
>
> OPTIONAL — leave this empty by default. Only set it when the user EXPLICITLY names a folder to place the new file in (e.g. "put it in the Engineering folder"). Do NOT call list\_folders or get\_folder to "pick a sensible folder" — when omitted, the file is created at the team root and the user can move it themselves. Spurious folder discovery wastes tokens and produces unexpected file placement.
>
> **presetId** `string`
>
> **typeface** `string ("rough" | "clean" | "mono")`
>
> **colorMode** `string ("pastel" | "bold" | "outline")`
>
> **direction** `string ("up" | "down" | "left" | "right")`
>
> **styleMode** `string ("plain" | "shadow" | "watercolor")`
>
> **background** `boolean`
>
> **isTeamFile** `boolean`
>
> Only honored by create\_diagram when a NEW file is being created (i.e. targetFileId is omitted). When true, the new file is shared with the team (non-private); when false, the new file is private to the caller. Required on plans that don't support private files. Ignored by update\_diagram, and ignored on create\_diagram when targetFileId is set (because no new file is created).
>
> **templateId** `string`
>
> **attachments** `array`
>
> **diagramType** `string ("freeform-diagram" | "sequence-diagram" | "entity-relationship-diagram" | "cloud-architecture-diagram" | "flowchart-diagram" | "bpmn-diagram")`
>
> OPTIONAL — LEAVE THIS EMPTY by default. Only set it when the user EXPLICITLY names a diagram type (e.g. 'make this a sequence diagram', 'use a cloud architecture diagram', 'turn it into an ERD'). When omitted, Eraser's render service picks the diagram type from the prompt text using diagram-type-specific heuristics and (if applicable) the preset/template in scope — that selection is usually better than guessing from the prompt yourself. Do NOT pre-classify the user's request into a diagram type just because the value is available in your schema; spurious type-locking produces worse diagrams than letting Eraser choose, especially on ambiguous prompts ('show how X works', 'diagram the architecture'). On update\_diagram, leave this empty as well — the existing diagram's type is preserved by default.
>
> **gitContexts** `array`
>
> **imageQuality** `string`
>
> **includeImage** `boolean`
>
> Set true only when you need a PNG URL to embed elsewhere. Not needed for in-app viewing — prefer the returned fileUrl/diagramUrl. Omitted from the response by default.
>
> **targetFileId** `string`
>
> **priorRequestId** `string`

> [accordion] Create document
>
> **Slug:** `ERASER_MCP_CREATE_DOCUMENT`
>
> PREFERRED 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.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string`

> [accordion] Create file
>
> **Slug:** `ERASER_MCP_CREATE_FILE`
>
> Create 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)
>
> #### Input Parameters
>
> **name** `string`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string`
>
> OPTIONAL — omit unless the user EXPLICITLY names a folder. When omitted, the file is created at the team root. Do NOT call list\_folders to "pick a folder".
>
> **isTeamFile** `boolean`
>
> When true, the file is shared with the team (non-private). Required on plans that do not support private files.
>
> **linkAccess** `string ("no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable")`
>
> **sourceFileId** `string`

> [accordion] Create folder
>
> **Slug:** `ERASER_MCP_CREATE_FOLDER`
>
> Create a new folder.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> **order** `number`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **parentFolderId** `string`

> [accordion] Create preset
>
> **Slug:** `ERASER_MCP_CREATE_PRESET`
>
> Create 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.
>
> #### Input Parameters
>
> **name** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **isDefault** `boolean`
>
> **description** `string`

> [accordion] Create template or reference
>
> **Slug:** `ERASER_MCP_CREATE_TEMPLATE_OR_REFERENCE`
>
> Create 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.
>
> #### Input Parameters
>
> **kind** `string ("template" | "reference")` *required*
>
> **name** `string`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string`
>
> **sourceFileId** `string`

> [accordion] Delete diagram
>
> **Slug:** `ERASER_MCP_DELETE_DIAGRAM`
>
> Delete a diagram from a file.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagramId** `string` *required*

> [accordion] Delete document
>
> **Slug:** `ERASER_MCP_DELETE_DOCUMENT`
>
> Clear a file's document body to an empty markdown document.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] Delete file
>
> **Slug:** `ERASER_MCP_DELETE_FILE`
>
> Archive a file.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] Delete folder
>
> **Slug:** `ERASER_MCP_DELETE_FOLDER`
>
> Delete a folder. Rejects when the folder is not empty.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string` *required*

> [accordion] Delete preset
>
> **Slug:** `ERASER_MCP_DELETE_PRESET`
>
> Delete a preset. Rejects when the preset has any rules, templates, or references.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string` *required*

> [accordion] Export diagram
>
> **Slug:** `ERASER_MCP_EXPORT_DIAGRAM`
>
> Render 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.
>
> #### Input Parameters
>
> **theme** `string ("light" | "dark")`
>
> **fileId** `string` *required*
>
> **format** `string ("png" | "jpeg" | "drawio")`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagramId** `string` *required*
>
> **background** `boolean`
>
> **imageQuality** `string`

> [accordion] Export document
>
> **Slug:** `ERASER_MCP_EXPORT_DOCUMENT`
>
> Export a file's markdown document body as a downloadable artifact.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **returnAs** `string ("url" | "stream")`

> [accordion] Export file
>
> **Slug:** `ERASER_MCP_EXPORT_FILE`
>
> Returns 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.
>
> #### Input Parameters
>
> **area** `string ("full" | "document" | "canvas")`
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **pageSize** `string ("A4" | "A3" | "Letter" | "Legal" | "Tabloid")`
>
> **returnAs** `string ("url" | "stream")`
>
> **pageOrientation** `string ("portrait" | "landscape")`

> [accordion] Get diagram
>
> **Slug:** `ERASER_MCP_GET_DIAGRAM`
>
> Fetch 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.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagramId** `string` *required*
>
> **includeFreeformDefinition** `boolean`

> [accordion] Get document
>
> **Slug:** `ERASER_MCP_GET_DOCUMENT`
>
> Fetch the full markdown body of a file's document.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] Get file
>
> **Slug:** `ERASER_MCP_GET_FILE`
>
> Fetch a file's metadata, document outline (headers), and the list of diagrams in it.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] Get folder
>
> **Slug:** `ERASER_MCP_GET_FOLDER`
>
> Fetch a folder by id.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string` *required*

> [accordion] Get me
>
> **Slug:** `ERASER_MCP_GET_ME`
>
> Fetch the current user, active team, and team memberships.

> [accordion] Get preset
>
> **Slug:** `ERASER_MCP_GET_PRESET`
>
> Fetch a preset including its rules, templates, and references.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string` *required*

> [accordion] Get template or reference
>
> **Slug:** `ERASER_MCP_GET_TEMPLATE_OR_REFERENCE`
>
> Fetch a template/reference's metadata, document outline, and diagram list.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] List diagrams
>
> **Slug:** `ERASER_MCP_LIST_DIAGRAMS`
>
> List the diagrams contained in a file.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] List files
>
> **Slug:** `ERASER_MCP_LIST_FILES`
>
> List files in the team workspace, optionally scoped to a folder.
>
> #### Input Parameters
>
> **sort** `string ("createdAt" | "updatedAt" | "-createdAt" | "-updatedAt")`
>
> **limit** `number`
>
> **author** `string`
>
> **cursor** `string`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string`

> [accordion] List folders
>
> **Slug:** `ERASER_MCP_LIST_FOLDERS`
>
> List folders. Pass `parentFolderId` to scope to direct children of a folder (or `null` for top-level only). Pass `nameContains` to resolve a folder the user names by string (e.g. 'the Engineering folder') without paging through the entire tree. Combining the two narrows further (e.g. top-level folders containing 'eng').
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **nameContains** `string`
>
> **parentFolderId** `string`

> [accordion] List presets
>
> **Slug:** `ERASER_MCP_LIST_PRESETS`
>
> List the team's presets. Pass `nameContains` to resolve a preset the user names by string (e.g. 'the Marketing preset') without scanning the full list — much cheaper in context tokens.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **nameContains** `string`

> [accordion] List teams
>
> **Slug:** `ERASER_MCP_LIST_TEAMS`
>
> List the teams the current user belongs to (OAuth only).

> [accordion] Manually create diagram
>
> **Slug:** `ERASER_MCP_MANUALLY_CREATE_DIAGRAM`
>
> ADVANCED — most callers should use create\_diagram instead. This tool writes a caller-supplied diagram definition VERBATIM into a new diagram; no AI runs.
>
> For DSL diagrams (flowchart-dsl, sequence-dsl, etc.) pass the DSL source as `code`. For freeform diagrams pass a freeform definition as `code` — either JSON (\{"title"?: string, "elements": \[ ... ]}) or the equivalent XML; it is parsed and laid out through the freeform render pass (text measurement, connection routing, etc.).
>
> Use ONLY WHEN: the user gave you a literal diagram definition to paste, you are converting from a non-Eraser source (other tool's export, programmatic generation), or you need byte-exact output for a reason the AI path cannot satisfy. For any natural-language description of what the diagram should contain (e.g. 'a sequence diagram showing checkout'), use create\_diagram — it picks the diagram type, generates the definition, and renders it for a fraction of the output tokens of composing it yourself.
>
> #### Input Parameters
>
> **code** `string` *required*
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagramType** `string ("freeform-diagram" | "sequence-diagram" | "entity-relationship-diagram" | "cloud-architecture-diagram" | "flowchart-diagram" | "bpmn-diagram")` *required*

> [accordion] Manually create document
>
> **Slug:** `ERASER_MCP_MANUALLY_CREATE_DOCUMENT`
>
> ADVANCED — most callers should use create\_document instead. This tool populates an empty file's document body with caller-supplied markdown VERBATIM; no AI runs and the bytes you pass are exactly what gets stored.
>
> Only callable on a file with an empty document body; if the file already has content, call manually\_update\_document (verbatim overwrite) or update\_document (targeted AI edit) instead.
>
> USE ONLY WHEN: the user gave you literal markdown to paste, you are converting from another format (HTML, Confluence export, programmatic generation), or you need byte-exact output. For any natural-language description of what the document should say, use create\_document.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **document** `string` *required*

> [accordion] Manually update diagram
>
> **Slug:** `ERASER_MCP_MANUALLY_UPDATE_DIAGRAM`
>
> ADVANCED — most callers should use update\_diagram instead. This tool writes a diagram's complete DSL/JSON (or freeform edits) VERBATIM; no AI runs and the bytes you pass are exactly what gets stored.
>
> USE ONLY WHEN:
>
> * the user gave you literal DSL/JSON they want pasted as-is,
> * you are converting from a non-Eraser source (other tool's export, programmatic generation),
> * or you need byte-exact output for a reason an AI refinement cannot satisfy.
>
> DO NOT use this tool just because the current diagram code happens to be in your context (e.g. you just called create\_diagram and want to apply a small refinement). For ANY user request phrased as a natural-language edit ('remove the X group', 'add a step', 'change the color', 'rename Y to Z') — even when you already have the full DSL in front of you — call update\_diagram instead. Re-emitting the entire DSL here to apply a conceptual edit costs the user large amounts of output tokens, risks accidental edits to unrelated parts, and gives a worse UX than letting Eraser apply the targeted change.
>
> #### Input Parameters
>
> **code** `string`
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagramId** `string` *required*
>
> **targetFileId** `string`
>
> **freeformEdits** `array`

> [accordion] Manually update document
>
> **Slug:** `ERASER_MCP_MANUALLY_UPDATE_DOCUMENT`
>
> ADVANCED — most callers should use update\_document instead. This tool replaces a file's document body with caller-supplied markdown VERBATIM; no AI runs and the WHOLE body is overwritten (no targeted block edits, no preservation of unrelated sections beyond what you re-emit).
>
> USE ONLY WHEN:
>
> * the user gave you literal markdown they want pasted as-is,
> * you are converting from a non-Eraser source (HTML, Confluence export, programmatic generation),
> * or you need byte-exact output for a reason an AI refinement cannot satisfy.
>
> DO NOT use this tool just because the current document markdown happens to be in your context. For ANY user request phrased as a natural-language edit ('add a section', 'fix the wording', 'remove that paragraph') — even when you already have the full body in front of you — call update\_document instead. Re-emitting the entire body here to apply a conceptual edit costs the user large amounts of output tokens, risks accidental edits to unrelated sections, and gives a worse UX than letting Eraser apply targeted block edits.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **document** `string` *required*

> [accordion] Manually update file
>
> **Slug:** `ERASER_MCP_MANUALLY_UPDATE_FILE`
>
> Replace a file's document markdown and/or diagram code in one call. No AI — caller supplies exact markdown/DSL/JSON.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **diagrams** `array`
>
> **document** `string`

> [accordion] Publish template or reference
>
> **Slug:** `ERASER_MCP_PUBLISH_TEMPLATE_OR_REFERENCE`
>
> Publish a new version of a template/reference file.
>
> #### Input Parameters
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.

> [accordion] Search
>
> **Slug:** `ERASER_MCP_SEARCH`
>
> Full-text and semantic search across files or diagrams. Omit 'kind' for content search (finds matching blocks). Use kind: 'file' only to look up a file by name (no block content returned). Use kind: 'diagram' to search within diagram code/titles.
>
> #### Input Parameters
>
> **kind** `string ("file" | "diagram")`
>
> Controls what is searched and how results are grouped. Omit (default) for full-content search — finds any text across all files and returns individual matching blocks with their file context. Use kind: 'file' ONLY to find a file by name — results are grouped by file with no per-block content. DO NOT use kind: 'file' if you want to find content within files; it will not return the content you need. Use kind: 'diagram' to search within diagram code/titles only.
>
> **limit** `number`
>
> **query** `string`
>
> **offset** `number`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **queries** `array`
>
> Submit up to 5 related query variants in one call. Results are merged and de-duplicated server-side, returning a single ranked list. Prefer this over making multiple separate search tool calls for related terms. When provided, the top-level `query` field is ignored.

> [accordion] Select team
>
> **Slug:** `ERASER_MCP_SELECT_TEAM`
>
> Set the active team for the session when the user belongs to multiple teams (OAuth only).
>
> #### Input Parameters
>
> **teamId** `string` *required*

> [accordion] Update diagram
>
> **Slug:** `ERASER_MCP_UPDATE_DIAGRAM`
>
> USE THIS for any user request that describes the change in natural language — verbs like 'add', 'remove', 'change', 'rename', 'recolor', 'make it more X', etc. Eraser's AI applies the change to the existing diagram in place; you only send the short instruction (e.g. `text: "remove the External Integrations group"`), NOT the full new DSL.
>
> IMPORTANT: pick this tool even when the full diagram code is already in your context (e.g. from the previous create\_diagram or get\_diagram response). Re-emitting the entire DSL via manually\_update\_diagram to apply a one-line conceptual edit is the WRONG default — it wastes a large number of output tokens, increases the chance of accidental edits/typos, and gives a worse UX than letting Eraser apply a targeted change.
>
> Only fall back to manually\_update\_diagram when the user gave you literal code to paste, you are converting from a non-Eraser format, or you need byte-exact output that the AI rewrite path cannot guarantee.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> **theme** `string ("light" | "dark")`
>
> **title** `string`
>
> **fileId** `string` *required*
>
> **format** `string ("png" | "jpeg")`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **styleId** `string`
>
> **folderId** `string`
>
> OPTIONAL — leave this empty by default. Only set it when the user EXPLICITLY names a folder to place the new file in (e.g. "put it in the Engineering folder"). Do NOT call list\_folders or get\_folder to "pick a sensible folder" — when omitted, the file is created at the team root and the user can move it themselves. Spurious folder discovery wastes tokens and produces unexpected file placement.
>
> **presetId** `string`
>
> **typeface** `string ("rough" | "clean" | "mono")`
>
> **colorMode** `string ("pastel" | "bold" | "outline")`
>
> **diagramId** `string`
>
> **direction** `string ("up" | "down" | "left" | "right")`
>
> **styleMode** `string ("plain" | "shadow" | "watercolor")`
>
> **background** `boolean`
>
> **isTeamFile** `boolean`
>
> Only honored by create\_diagram when a NEW file is being created (i.e. targetFileId is omitted). When true, the new file is shared with the team (non-private); when false, the new file is private to the caller. Required on plans that don't support private files. Ignored by update\_diagram, and ignored on create\_diagram when targetFileId is set (because no new file is created).
>
> **templateId** `string`
>
> **attachments** `array`
>
> **diagramType** `string ("freeform-diagram" | "sequence-diagram" | "entity-relationship-diagram" | "cloud-architecture-diagram" | "flowchart-diagram" | "bpmn-diagram")`
>
> OPTIONAL — LEAVE THIS EMPTY by default. Only set it when the user EXPLICITLY names a diagram type (e.g. 'make this a sequence diagram', 'use a cloud architecture diagram', 'turn it into an ERD'). When omitted, Eraser's render service picks the diagram type from the prompt text using diagram-type-specific heuristics and (if applicable) the preset/template in scope — that selection is usually better than guessing from the prompt yourself. Do NOT pre-classify the user's request into a diagram type just because the value is available in your schema; spurious type-locking produces worse diagrams than letting Eraser choose, especially on ambiguous prompts ('show how X works', 'diagram the architecture'). On update\_diagram, leave this empty as well — the existing diagram's type is preserved by default.
>
> **gitContexts** `array`
>
> **imageQuality** `string`
>
> **includeImage** `boolean`
>
> Set true only when you need a PNG URL to embed elsewhere. Not needed for in-app viewing — prefer the returned fileUrl/diagramUrl. Omitted from the response by default.
>
> **priorRequestId** `string`

> [accordion] Update document
>
> **Slug:** `ERASER_MCP_UPDATE_DOCUMENT`
>
> USE THIS for any user request that describes the change in natural language — verbs like 'add a section', 'rewrite the intro', 'fix the typo', 'remove the deprecated paragraph', etc. Eraser's AI applies targeted block-level edits to the existing markdown; you only send the short instruction, NOT the full rewritten document.
>
> IMPORTANT: pick this tool even when the full document markdown is already in your context (e.g. from a previous create\_document or get\_file response). Re-emitting the entire body via manually\_update\_document to apply a conceptual edit is the WRONG default — it wastes large amounts of output tokens, risks accidental edits/typos in unrelated sections, and gives a worse UX than letting Eraser apply a targeted change.
>
> Only fall back to manually\_update\_document when the user gave you literal markdown to paste, you are converting from another format, or you need byte-exact output the AI rewrite path cannot guarantee.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string`

> [accordion] Update file
>
> **Slug:** `ERASER_MCP_UPDATE_FILE`
>
> Update file metadata (title, folder, sharing). When applyTemplate is provided, AI fills the file's document and diagrams from a preset template.
>
> #### Input Parameters
>
> **title** `string`
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string`
>
> **isTeamFile** `boolean`
>
> **linkAccess** `string ("no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable")`
>
> **applyTemplate** `object`

> [accordion] Update folder
>
> **Slug:** `ERASER_MCP_UPDATE_FOLDER`
>
> Rename or move a folder, or bulk-apply a link-sharing setting to every file inside it (recursively). Note: folders do not store linkAccess themselves — to change sharing you MUST pass both `linkAccess` and `applySharingToDescendantFiles: true` together.
>
> #### Input Parameters
>
> **name** `string`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **folderId** `string` *required*
>
> **linkAccess** `string ("no-link-access" | "anyone-with-link-can-edit" | "publicly-viewable" | "publicly-editable" | "sso-readable" | "sso-editable")`
>
> Link-sharing setting to apply to every file under this folder. Folders themselves do not store linkAccess, so this MUST be paired with `applySharingToDescendantFiles: true`; passing linkAccess alone is rejected with an invalid-params error.
>
> **parentFolderId** `string`
>
> **applySharingToDescendantFiles** `boolean`
>
> Required (set to true) when supplying `linkAccess`. Rewrites the linkAccess setting on every file in this folder and all subfolders recursively.

> [accordion] Update preset
>
> **Slug:** `ERASER_MCP_UPDATE_PRESET`
>
> Rename a preset or update its metadata (`name`, `description`, `isDefault`). Does NOT modify rules or templates/references — use `update_rules` and `add_or_remove_template_or_reference` for those.
>
> #### Input Parameters
>
> **name** `string`
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string` *required*
>
> **isDefault** `boolean`
>
> **description** `string`

> [accordion] Update rules
>
> **Slug:** `ERASER_MCP_UPDATE_RULES`
>
> Add, update, or remove rules on a preset in a single batched call. Rules are natural-language instructions the AI will follow when generating diagrams/documents under this preset (e.g. 'use dark theme', 'all auth flows should be sequence diagrams'). Typically called as step 3 of the create-preset chain (after `create_preset` and `add_or_remove_template_or_reference`), but can be called any time to tune an existing preset.
>
> #### Input Parameters
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
>
> **presetId** `string` *required*
>
> **operations** `array` *required*

> [accordion] Update template or reference
>
> **Slug:** `ERASER_MCP_UPDATE_TEMPLATE_OR_REFERENCE`
>
> Rename a template or reference file.
>
> #### Input Parameters
>
> **name** `string`
>
> **fileId** `string` *required*
>
> **teamId** `string`
>
> ID of the team to operate in (get IDs from list\_teams). Optional when an active team is already set for this session; required otherwise. Overrides the active team for this call only.
