io.github.tldraw/tldraw is an MCP server published by io.github.tldraw, hosted at tldraw-mcp-app.tldraw.workers.dev. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 6 tools, including search, exec, _exec_callback, _get_canvas_state, read_checkpoint.
Draw and visually collaborate with your agents on tldraw's canvas.
1 connections through 5 shared values. Tap any node.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Search the tldraw Editor API spec by writing JavaScript that receives a `spec` object and returns a result. The spec contains: spec.members (all Editor methods/properties with name, kind, signature, description, category), spec.categories (category names), spec.types.shapes (focused shape type definitions with props), spec.types.shapeTypes (list of all shape type strings), spec.helpers (exec helper functions with descriptions, params, examples). Examples: - Find shape methods: return spec.members.filter(m => m.category === "shapes").map(m => ({ name: m.name, signature: m.signature })) - Get arrow shape props: return spec.types.shapes.find(s => s.shapeType === "arrow") - List all categories: return spec.categories - Find a helper: return spec.helpers.find(h => h.name === "createArrowBetweenShapes")
| Parameter | Type | Description |
|---|---|---|
| code * | string | JavaScript code that receives `spec` and returns a result. Must use `return` to produce output. |
{
"name": "search",
"title": "Search Editor API",
"description": "Search the tldraw Editor API spec by writing JavaScript that receives a `spec` object and returns a result. The spec contains: spec.members (all Editor methods/properties with name, kind, signature, description, category), spec.categories (category names), spec.types.shapes (focused shape type definitions with props), spec.types.shapeTypes (list of all shape type strings), spec.helpers (exec helper functions with descriptions, params, examples).\n\nExamples:\n- Find shape methods: return spec.members.filter(m => m.category === \"shapes\").map(m => ({ name: m.name, signature: m.signature }))\n- Get arrow shape props: return spec.types.shapes.find(s => s.shapeType === \"arrow\")\n- List all categories: return spec.categories\n- Find a helper: return spec.helpers.find(h => h.name === \"createArrowBetweenShapes\")",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "JavaScript code that receives `spec` and returns a result. Must use `return` to produce output."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Execute JavaScript code on a tldraw canvas. The code runs in the widget with access to the live `editor` instance, helper functions, and normal js. Use the `search` tool first to discover available Editor methods and shape types. Each canvas has a unique `canvasId`. Omit `canvasId` to create a new blank canvas. To edit an existing canvas, pass the `canvasId` that was returned by a previous exec call. Shapes and text grow depending on the amount of text they have. Use clever scripting to ensure there are no unintended overlaps. Examples: - Create a rectangle: editor.createShape({ _type: 'rectangle', shapeId: 'box1', x: 200, y: 120, w: 320, h: 180, text: 'Hello' }) - Connect shapes with an arrow: editor.createShape({ _type: 'arrow', shapeId: 'a1', fromId: 'box1', toId: 'box2', x1: 0, y1: 0, x2: 100, y2: 0 }) - Select and zoom: editor.select('box1'); editor.zoomToSelection() - Read shapes: return editor.getCurrentPageShapes() - Distribute evenly: editor.distributeShapes(editor.getSelectedShapeIds(), 'horizontal') - Box around shapes: boxShapes(['box1', 'box2'], { text: 'Group label', color: 'blue' }) - Stack shapes dynamically: editor.createShape({ _type: 'rectangle', shapeId: 'a', x: 0, y: 0, w: 300, h: 200, text: 'First box\nwith wrapping text' }); const bounds = editor.getShapePageBounds('a'); editor.createShape({ _type: 'rectangle', shapeId: 'b', x: 0, y: bounds.maxY + 20, w: 300, h: 200, text: 'Below first' })
| Parameter | Type | Description |
|---|---|---|
| code * | string | JavaScript code to execute. Has access to `editor` (tldraw Editor instance) and helper functions. |
| canvasId | string | Canvas ID to edit. Omit to create a new blank canvas. Pass a canvasId from a previous exec result to continue editing that canvas. |
{
"name": "exec",
"title": "Execute Code",
"description": "Execute JavaScript code on a tldraw canvas. The code runs in the widget with access to the live `editor` instance, helper functions, and normal js. Use the `search` tool first to discover available Editor methods and shape types.\n\nEach canvas has a unique `canvasId`. Omit `canvasId` to create a new blank canvas. To edit an existing canvas, pass the `canvasId` that was returned by a previous exec call.\n\nShapes and text grow depending on the amount of text they have. Use clever scripting to ensure there are no unintended overlaps.\n\nExamples:\n- Create a rectangle: editor.createShape({ _type: 'rectangle', shapeId: 'box1', x: 200, y: 120, w: 320, h: 180, text: 'Hello' })\n- Connect shapes with an arrow: editor.createShape({ _type: 'arrow', shapeId: 'a1', fromId: 'box1', toId: 'box2', x1: 0, y1: 0, x2: 100, y2: 0 })\n- Select and zoom: editor.select('box1'); editor.zoomToSelection()\n- Read shapes: return editor.getCurrentPageShapes()\n- Distribute evenly: editor.distributeShapes(editor.getSelectedShapeIds(), 'horizontal')\n- Box around shapes: boxShapes(['box1', 'box2'], { text: 'Group label', color: 'blue' })\n- Stack shapes dynamically: editor.createShape({ _type: 'rectangle', shapeId: 'a', x: 0, y: 0, w: 300, h: 200, text: 'First box\\nwith wrapping text' }); const bounds = editor.getShapePageBounds('a'); editor.createShape({ _type: 'rectangle', shapeId: 'b', x: 0, y: bounds.maxY + 20, w: 300, h: 200, text: 'Below first' })",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "JavaScript code to execute. Has access to `editor` (tldraw Editor instance) and helper functions."
},
"canvasId": {
"type": "string",
"description": "Canvas ID to edit. Omit to create a new blank canvas. Pass a canvasId from a previous exec result to continue editing that canvas."
}
}
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}App-only: widget calls this to resolve a pending exec request.
| Parameter | Type | Description |
|---|---|---|
| error | string | |
| result | object | |
| channel * | string | |
| execKey | string |
{
"name": "_exec_callback",
"title": "Exec Callback",
"description": "App-only: widget calls this to resolve a pending exec request.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"channel"
],
"properties": {
"error": {
"type": "string"
},
"result": {
"type": "object",
"required": [
"success"
],
"properties": {
"error": {
"type": "string"
},
"result": {},
"success": {
"type": "boolean"
},
"canvasId": {
"type": "string"
}
}
},
"channel": {
"type": "string"
},
"execKey": {
"type": "string"
}
}
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}App-only: get the latest checkpoint for a canvas by its canvasId.
| Parameter | Type | Description |
|---|---|---|
| canvasId * | string |
{
"name": "_get_canvas_state",
"title": "Get Canvas State",
"description": "App-only: get the latest checkpoint for a canvas by its canvasId.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"canvasId"
],
"properties": {
"canvasId": {
"type": "string",
"minLength": 1
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}App-only: read shapes from a checkpoint by ID.
| Parameter | Type | Description |
|---|---|---|
| checkpointId * | string |
{
"name": "read_checkpoint",
"title": "Read Checkpoint",
"description": "App-only: read shapes from a checkpoint by ID.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"checkpointId"
],
"properties": {
"checkpointId": {
"type": "string",
"minLength": 1
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}App-only: save shapes to a checkpoint (from user edits). shapesJson and assetsJson must be JSON array strings.
| Parameter | Type | Description |
|---|---|---|
| canvasId | string | |
| assetsJson | string | |
| shapesJson * | string | |
| bindingsJson | string | |
| checkpointId * | string |
{
"name": "save_checkpoint",
"title": "Save Checkpoint",
"description": "App-only: save shapes to a checkpoint (from user edits). shapesJson and assetsJson must be JSON array strings.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"checkpointId",
"shapesJson"
],
"properties": {
"canvasId": {
"type": "string"
},
"assetsJson": {
"type": "string"
},
"shapesJson": {
"type": "string"
},
"bindingsJson": {
"type": "string"
},
"checkpointId": {
"type": "string",
"minLength": 1
}
}
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Use `search` to query the tldraw Editor API spec (e.g. search for methods by category or name). Use `exec` to run JavaScript on the canvas — your code receives `editor` (the tldraw Editor instance) and helpers like toRichText, createShapeId, createArrowBetweenShapes. The current canvas state is kept in model context as raw TLShape, asset, and binding data.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.