> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the Eraser MCP server

The Eraser MCP connector routes your AI agent's tool calls to Eraser's own MCP server through Scalekit. Each user signs in to Eraser once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 41 tools.

**Authentication:** OAuth 2.1/DCR
**Categories:** Design, Developer Tools
**Tools:** 41: 15 read, 21 write, 5 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=ERASERMCP)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Eraser MCP connection

   In **AgentKit > Connections**, create an Eraser MCP connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Eraser MCP server, so you don't need to register an OAuth app.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'erasermcp'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Eraser MCP:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'erasermcp_get_me',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "erasermcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Eraser MCP:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="erasermcp_get_me",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'erasermcp_export_diagram',
  toolInput: {
    diagramId: '<diagramId>',
    fileId: '<fileId>',
  },
  connector: 'erasermcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="erasermcp_export_diagram",
    tool_input={
        "diagramId": "<diagramId>",
        "fileId": "<fileId>",
    },
    connection_name="erasermcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `erasermcp_export_diagram`

Export Diagram · Read-only

Render a canvas diagram to PNG or JPEG and return a temporary image URL. Tell the user to download it from the returned imageUrl.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `diagramId` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `background` (`boolean`, optional): png, jpeg and svg only.
- `format` (`string`, optional): Defaults to png. drawio, visio, powerpoint and pdf need a paid plan. visio supports cloud-architecture-diagram, flowchart-diagram, freeform-diagram, bpmn-diagram diagrams; bpmn supports bpmn-diagram diagrams only. One of: `png`, `jpeg`, `svg`, `drawio`, `visio`, `powerpoint`, `bpmn`, `pdf`.
- `imageQuality` (`string`, optional): png and jpeg only.
- `returnAs` (`string`, optional): Defaults to stream: an inline base64 image (png, jpeg) or embedded file (every other format), with no storage upload or URL. Select url explicitly to store an export. One of: `url`, `stream`.
- `teamId` (`string`, optional): 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.
- `theme` (`string`, optional): No description. One of: `light`, `dark`.
- `urlSettings` (`object`, optional): No description.

Example input: `{"diagramId":"<diagramId>","fileId":"<fileId>"}`

### `erasermcp_export_document`

Export Document · Read-only

Export a file's markdown document body as a downloadable artifact.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `format` (`string`, optional): Defaults to markdown. pdf prints the document with its embedded diagrams and figures, as Export → PDF → Document does in the app, and requires a paid plan. One of: `markdown`, `pdf`.
- `returnAs` (`string`, optional): Defaults to stream: an inline markdown resource, or the PDF as an embedded base64 file (at most 5 MB after encoding), with no storage upload. url stores a downloadable export. One of: `url`, `stream`.
- `teamId` (`string`, optional): 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.
- `urlSettings` (`object`, optional): No description.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_get_diagram`

Get Diagram · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `diagramId` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `includeFreeformDefinition` (`boolean`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"diagramId":"<diagramId>","fileId":"<fileId>"}`

### `erasermcp_get_document`

Get Document · Read-only

Fetch the full markdown body of a file's document.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_get_file`

Get File · Read-only

Fetch a file's metadata, document outline (headers), and the list of diagrams in it.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_get_folder`

Get Folder · Read-only

Fetch a folder by id.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `folderId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"folderId":"put it in the Engineering folder"}`

### `erasermcp_get_me`

Get Me · Read-only

Fetch the current user, active team, and team memberships.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs: none.

Example input: `{}`

### `erasermcp_get_preset`

Get Preset · Read-only

Fetch a preset including its rules, templates, and references.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `presetId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"presetId":"<presetId>"}`

### `erasermcp_get_template_or_reference`

Get Template Or Reference · Read-only

Fetch a template/reference's metadata, document outline, and diagram list.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_list_diagrams`

List Diagrams · Read-only

List the diagrams contained in a file.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_list_files`

List Files · Read-only

List files in the team workspace, optionally scoped to a folder.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `author` (`string`, optional): No description.
- `cursor` (`string`, optional): No description.
- `folderId` (`string`, optional): No description.
- `limit` (`number`, optional): No description.
- `sort` (`string`, optional): No description. One of: `createdAt`, `updatedAt`, `-createdAt`, `-updatedAt`.
- `teamId` (`string`, optional): 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.

Example input: `{}`

### `erasermcp_list_folders`

List Folders · Read-only

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').

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `nameContains` (`string`, optional): No description.
- `parentFolderId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{}`

### `erasermcp_list_presets`

List Presets · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `nameContains` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{}`

### `erasermcp_list_teams`

List Teams · Read-only

List the teams the current user belongs to (OAuth only).

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs: none.

Example input: `{}`

### `erasermcp_search`

Search · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `kind` (`string`, optional): 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. One of: `file`, `diagram`.
- `limit` (`number`, optional): No description.
- `offset` (`number`, optional): No description.
- `queries` (`array`, optional): 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.
- `query` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{}`

### `erasermcp_add_or_remove_template_or_reference`

Add Or Remove Template Or Reference · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `kind` (`string`, required): No description. One of: `template`, `reference`.
- `operation` (`string`, required): No description. One of: `add`, `remove`.
- `presetId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>","kind":"template","operation":"add","presetId":"<presetId>"}`

### `erasermcp_create_diagram`

Create Diagram · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `text` (`string`, required): No description.
- `attachments` (`array`, optional): No description.
- `background` (`boolean`, optional): No description.
- `colorMode` (`string`, optional): No description. One of: `pastel`, `bold`, `outline`.
- `diagramType` (`string`, optional): 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. One of: `freeform-diagram`, `sequence-diagram`, `entity-relationship-diagram`, `cloud-architecture-diagram`, `flowchart-diagram`, `bpmn-diagram`.
- `direction` (`string`, optional): No description. One of: `up`, `down`, `left`, `right`.
- `folderId` (`string`, optional): 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.
- `format` (`string`, optional): No description. One of: `png`, `jpeg`.
- `gitContexts` (`array`, optional): No description.
- `imageQuality` (`string`, optional): No description.
- `includeImage` (`boolean`, optional): Set true only when you need a PNG URL. By default no image is rendered or stored and the response carries no imageUrl. When true, imageUrl is by default a private link that expires after 1 hour; use urlSettings to request a longer ttl or access: "public" for a permanent link. Public URLs are not secure: anyone with the link can view the image, so use them only when the user explicitly wants a permanent, shareable image. The persisted diagram is exported afterwards, so an image failure never fails the diagram write. Not needed for in-app viewing — prefer the returned fileUrl/diagramUrl.
- `isTeamFile` (`boolean`, optional): 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).
- `presetId` (`string`, optional): OPTIONAL — the AI preset (rules, references, templates) to apply. Omit it to use the team default preset, when the team has one; pass null to use no preset. To resolve a preset the user names, call list_presets with nameContains.
- `priorRequestId` (`string`, optional): No description.
- `styleId` (`string`, optional): No description.
- `styleMode` (`string`, optional): No description. One of: `plain`, `shadow`, `watercolor`.
- `targetFileId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.
- `templateId` (`string`, optional): OPTIONAL — usually leave this empty. Whenever a preset applies, Eraser picks the preset template the request names or clearly matches, so to use a template just name it in `text` (e.g. 'using the Incident Report template'). Set templateId only to force one specific template: pass its fileId from get_preset's `templates` list. It must belong to the preset in scope, so also pass that preset's presetId unless it is the team default; otherwise the call fails.
- `theme` (`string`, optional): No description. One of: `light`, `dark`.
- `title` (`string`, optional): No description.
- `typeface` (`string`, optional): No description. One of: `rough`, `clean`, `mono`.
- `urlSettings` (`object`, optional): Access policy for an opt-in image URL. Omit to use the team/org default (one-hour token links unless default.type is public). ttl applies only to token URLs and accepts seconds or durations such as "6h", "5d", or "2w" (maximum 365d). Omitted ttl inherits team/org default.ttl, then 1h. Teams allow permanent or expiring download links, expiring download links only, or none; a disallowed link request returns an error.

Example input: `{"text":"<text>"}`

### `erasermcp_create_document`

Create Document · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `text` (`string`, required): No description.
- `presetId` (`string`, optional): OPTIONAL — the AI preset (rules, references, templates) to apply. Omit it to use the team default preset, when the team has one; pass null to use no preset. To resolve a preset the user names, call list_presets with nameContains.
- `teamId` (`string`, optional): 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.
- `templateId` (`string`, optional): OPTIONAL — usually leave this empty. Whenever a preset applies, Eraser picks the preset template the request names or clearly matches, so to use a template just name it in `text` (e.g. 'using the Incident Report template'). Set templateId only to force one specific template: pass its fileId from get_preset's `templates` list. It must belong to the preset in scope, so also pass that preset's presetId unless it is the team default; otherwise the call fails.

Example input: `{"fileId":"<fileId>","text":"<text>"}`

### `erasermcp_create_file`

Create File · Write

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)

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `folderId` (`string`, optional): 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`, optional): When true, the file is shared with the team (non-private). Required on plans that do not support private files.
- `linkAccess` (`string`, optional): No description. One of: `no-link-access`, `anyone-with-link-can-edit`, `publicly-viewable`, `publicly-editable`, `sso-readable`, `sso-editable`.
- `name` (`string`, optional): No description.
- `sourceFileId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{}`

### `erasermcp_create_folder`

Create Folder · Write

Create a new folder.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): No description.
- `order` (`number`, optional): No description.
- `parentFolderId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"name":"<name>"}`

### `erasermcp_create_preset`

Create Preset · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `isDefault` (`boolean`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"name":"<name>"}`

### `erasermcp_create_template_or_reference`

Create Template Or Reference · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `kind` (`string`, required): No description. One of: `template`, `reference`.
- `name` (`string`, optional): No description.
- `presetId` (`string`, optional): No description.
- `sourceFileId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"kind":"template"}`

### `erasermcp_manually_create_diagram`

Manually Create Diagram · Write

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 JSX; 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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `code` (`string`, required): No description.
- `diagramType` (`string`, required): No description. One of: `freeform-diagram`, `sequence-diagram`, `entity-relationship-diagram`, `cloud-architecture-diagram`, `flowchart-diagram`, `bpmn-diagram`.
- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"code":"<code>","diagramType":"make this a sequence diagram","fileId":"<fileId>"}`

### `erasermcp_manually_create_document`

Manually Create Document · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `document` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"document":"<document>","fileId":"<fileId>"}`

### `erasermcp_manually_update_diagram`

Manually Update Diagram · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `diagramId` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `code` (`string`, optional): No description.
- `freeformEdits` (`array`, optional): No description.
- `targetFileId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"diagramId":"<diagramId>","fileId":"<fileId>"}`

### `erasermcp_manually_update_document`

Manually Update Document · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `document` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"document":"<document>","fileId":"<fileId>"}`

### `erasermcp_manually_update_file`

Manually Update File · Write

Replace a file's document markdown and/or diagram code in one call. No AI — caller supplies exact markdown/DSL/JSON.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `diagrams` (`array`, optional): No description.
- `document` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_publish_template_or_reference`

Publish Template Or Reference · Write

Publish a new version of a template/reference file.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_select_team`

Select Team · Write

Set the active team for the session when the user belongs to multiple teams (OAuth only).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `teamId` (`string`, required): No description.

Example input: `{"teamId":"<teamId>"}`

### `erasermcp_update_diagram`

Update Diagram · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `text` (`string`, required): No description.
- `attachments` (`array`, optional): No description.
- `background` (`boolean`, optional): No description.
- `colorMode` (`string`, optional): No description. One of: `pastel`, `bold`, `outline`.
- `diagramId` (`string`, optional): No description.
- `diagramType` (`string`, optional): 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. One of: `freeform-diagram`, `sequence-diagram`, `entity-relationship-diagram`, `cloud-architecture-diagram`, `flowchart-diagram`, `bpmn-diagram`.
- `direction` (`string`, optional): No description. One of: `up`, `down`, `left`, `right`.
- `folderId` (`string`, optional): 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.
- `format` (`string`, optional): No description. One of: `png`, `jpeg`.
- `gitContexts` (`array`, optional): No description.
- `imageQuality` (`string`, optional): No description.
- `includeImage` (`boolean`, optional): Set true only when you need a PNG URL. By default no image is rendered or stored and the response carries no imageUrl. When true, imageUrl is by default a private link that expires after 1 hour; use urlSettings to request a longer ttl or access: "public" for a permanent link. Public URLs are not secure: anyone with the link can view the image, so use them only when the user explicitly wants a permanent, shareable image. The persisted diagram is exported afterwards, so an image failure never fails the diagram write. Not needed for in-app viewing — prefer the returned fileUrl/diagramUrl.
- `isTeamFile` (`boolean`, optional): 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).
- `presetId` (`string`, optional): OPTIONAL — the AI preset (rules, references, templates) to apply. Omit it to use the team default preset, when the team has one; pass null to use no preset. To resolve a preset the user names, call list_presets with nameContains.
- `priorRequestId` (`string`, optional): No description.
- `styleId` (`string`, optional): No description.
- `styleMode` (`string`, optional): No description. One of: `plain`, `shadow`, `watercolor`.
- `teamId` (`string`, optional): 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.
- `templateId` (`string`, optional): OPTIONAL — usually leave this empty. Whenever a preset applies, Eraser picks the preset template the request names or clearly matches, so to use a template just name it in `text` (e.g. 'using the Incident Report template'). Set templateId only to force one specific template: pass its fileId from get_preset's `templates` list. It must belong to the preset in scope, so also pass that preset's presetId unless it is the team default; otherwise the call fails.
- `theme` (`string`, optional): No description. One of: `light`, `dark`.
- `title` (`string`, optional): No description.
- `typeface` (`string`, optional): No description. One of: `rough`, `clean`, `mono`.
- `urlSettings` (`object`, optional): Access policy for an opt-in image URL. Omit to use the team/org default (one-hour token links unless default.type is public). ttl applies only to token URLs and accepts seconds or durations such as "6h", "5d", or "2w" (maximum 365d). Omitted ttl inherits team/org default.ttl, then 1h. Teams allow permanent or expiring download links, expiring download links only, or none; a disallowed link request returns an error.

Example input: `{"fileId":"<fileId>","text":"<text>"}`

### `erasermcp_update_document`

Update Document · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `text` (`string`, required): No description.
- `presetId` (`string`, optional): OPTIONAL — the AI preset (rules, references, templates) to apply. Omit it to use the team default preset, when the team has one; pass null to use no preset. To resolve a preset the user names, call list_presets with nameContains.
- `teamId` (`string`, optional): 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.
- `templateId` (`string`, optional): OPTIONAL — usually leave this empty. Whenever a preset applies, Eraser picks the preset template the request names or clearly matches, so to use a template just name it in `text` (e.g. 'using the Incident Report template'). Set templateId only to force one specific template: pass its fileId from get_preset's `templates` list. It must belong to the preset in scope, so also pass that preset's presetId unless it is the team default; otherwise the call fails.

Example input: `{"fileId":"<fileId>","text":"<text>"}`

### `erasermcp_update_file`

Update File · Write

Update file metadata (title, folder, sharing). When applyTemplate is provided, AI fills the file's document and diagrams from a preset template.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fileId` (`string`, required): No description.
- `applyTemplate` (`object`, optional): Fills an EMPTY file (no document, no diagrams) from a preset template with AI: the template's document is generated, plus one diagram per template diagram (up to 5). Fails on a file that already has content; use update_document / update_diagram to change existing content.
- `folderId` (`string`, optional): No description.
- `isTeamFile` (`boolean`, optional): No description.
- `linkAccess` (`string`, optional): No description. One of: `no-link-access`, `anyone-with-link-can-edit`, `publicly-viewable`, `publicly-editable`, `sso-readable`, `sso-editable`.
- `teamId` (`string`, optional): 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.
- `title` (`string`, optional): No description.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_update_folder`

Update Folder · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `folderId` (`string`, required): No description.
- `applySharingToDescendantFiles` (`boolean`, optional): Required (set to true) when supplying `linkAccess`. Rewrites the linkAccess setting on every file in this folder and all subfolders recursively.
- `linkAccess` (`string`, optional): 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. One of: `no-link-access`, `anyone-with-link-can-edit`, `publicly-viewable`, `publicly-editable`, `sso-readable`, `sso-editable`.
- `name` (`string`, optional): No description.
- `parentFolderId` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"folderId":"put it in the Engineering folder"}`

### `erasermcp_update_preset`

Update Preset · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `presetId` (`string`, required): No description.
- `description` (`string`, optional): No description.
- `isDefault` (`boolean`, optional): No description.
- `name` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"presetId":"<presetId>"}`

### `erasermcp_update_rules`

Update Rules · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `operations` (`array`, required): No description.
- `presetId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"operations":[],"presetId":"<presetId>"}`

### `erasermcp_update_template_or_reference`

Update Template Or Reference · Write

Rename a template or reference file.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `fileId` (`string`, required): No description.
- `name` (`string`, optional): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_delete_diagram`

Delete Diagram · Destructive

Delete a diagram from a file.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `diagramId` (`string`, required): No description.
- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"diagramId":"<diagramId>","fileId":"<fileId>"}`

### `erasermcp_delete_document`

Delete Document · Destructive

Clear a file's document body to an empty markdown document.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_delete_file`

Delete File · Destructive

Archive a file.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `fileId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"fileId":"<fileId>"}`

### `erasermcp_delete_folder`

Delete Folder · Destructive

Delete a folder. Rejects when the folder is not empty.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `folderId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"folderId":"put it in the Engineering folder"}`

### `erasermcp_delete_preset`

Delete Preset · Destructive

Delete a preset. Rejects when the preset has any rules, templates, or references.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `presetId` (`string`, required): No description.
- `teamId` (`string`, optional): 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.

Example input: `{"presetId":"<presetId>"}`

## Related

Other Design connectors ([all 26](/agentkit/connectors/?category=design)):

- [Figma](/agentkit/connectors/figma/): Scalekit connector, OAuth, 54 tools
- [Miro](/agentkit/connectors/miro/): Scalekit connector, OAuth, 115 tools
- [Mural](/agentkit/connectors/mural/): Scalekit connector, OAuth, 61 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
