tldraw-mcp
tldraw-mcp
用于通过 JSON 操作编辑 tldraw .tldr 文件的极简 MCP 服务器。无头模式,无需浏览器。
状态
工作骨架。已连接模式验证(@tldraw/tlschema 验证器在每次写入前运行),分数索引使用 @tldraw/utils,文件写入由 proper-lockfile 保护。输出已通过契约测试层中的 Store.loadStoreSnapshot() 对真实的 tldraw 运行时进行了端到端验证。
Related MCP server: obsidian-codex-mcp
工具
文件 / 页面生命周期
工具 | 功能 |
| 创建一个带有默认页面的新 |
| 添加一个新页面 |
| 列出页面(包含 id、名称、排序索引) |
| 移动形状; |
形状
工具 | 功能 |
| 创建矩形(几何形状) |
| 创建文本形状 |
| 通过重置父级来对形状进行分组 |
| 解散组,将其子级重置为组的父级 |
| 同一页面上两个形状之间的箭头 + 绑定 |
| 列出形状 — 仅包含 id、类型、x、y、标签 |
| 按 id 获取单个形状的完整记录 |
| 浅合并补丁(使用嵌套的 |
| 按 id 删除; |
发现与逃生舱(灵感来自官方 tldraw-mcp-app)
工具 | 功能 | 代币消耗 |
| 列出支持的形状类型 + 精选的必需属性。传入 | 低 / 中 |
| 对文件运行 | 不定 |
检查点(安全)
工具 | 功能 | 代币消耗 |
| 将 | 低 |
| 列出备份,按最新排序 | 低 |
| 恢复备份(如果省略 | 低 |
节省代币的设计:工具接收原始参数,返回 id 或 ok。仅在您明确调用 get_shape 时,完整的 JSON 才会进入上下文。
安装
选项 1 · npx(无需安装,推荐)
npx -y github:m9810223/tldraw-mcp首次运行会克隆、运行 npm install,然后触发构建 dist/ 的 prepare 脚本。后续运行会被缓存。
固定分支 / 标签 / 提交:
npx -y github:m9810223/tldraw-mcp#main
npx -y github:m9810223/tldraw-mcp#v0.1.0
npx -y github:m9810223/tldraw-mcp#abc1234选项 2 · 全局安装
npm install -g github:m9810223/tldraw-mcp
tldraw-mcp # the bin is on PATH选项 3 · 通过 SSH 的私有仓库
npx -y git+ssh://git@github.com/m9810223/tldraw-mcp.git选项 4 · 本地克隆(用于开发)
git clone https://github.com/m9810223/tldraw-mcp.git
cd tldraw-mcp
npm install
npm run build
node dist/index.js # stdio MCP — waits on stdin要求
Node.js ≥ 20(由
engines.node强制执行)PATH中的jq(仅exec_jq工具需要)macOS:
brew install jqDebian/Ubuntu:
sudo apt-get install -y jq
连接到 Claude Code
claude mcp add(推荐)。需要 -- 分隔符,以便 -y 传递给 npx 而不是被解析为 claude mcp add 的标志:
claude mcp add tldraw -- npx -y github:m9810223/tldraw-mcp添加 -s user 用于全局(所有项目),或 -s project 用于检入仓库的 .mcp.json。默认是 -s local(当前项目,您的机器)。
……或者通过编辑 .mcp.json(项目)/ ~/.claude.json(用户全局):
{
"mcpServers": {
"tldraw": {
"command": "npx",
"args": ["-y", "github:m9810223/tldraw-mcp"]
}
}
}如果您通过选项 2 全局安装:
{
"mcpServers": {
"tldraw": { "command": "tldraw-mcp" }
}
}重启 Claude Code,然后 /mcp 应该会列出带有 17 个工具的 tldraw 服务器。
连接到其他 MCP 客户端
相同的 JSON 结构,不同的配置文件位置:
客户端 | 配置文件路径 |
Claude Desktop |
|
Cursor |
|
VS Code |
|
引导 .tldr 文件
使用 create_empty_file 工具,或者从 tldraw.com 保存一个空白画布并将工具指向该绝对路径。
create_empty_file({ file: "/tmp/demo.tldr" })与官方 tldraw-mcp-app 的设计对比
托管在 Cloudflare 上的官方 MCP 仅公开 search + exec(在实时 tldraw 编辑器中运行任何 JS)。此骨架则相反 — 对 .tldr 文件进行类型化的 JSON 编辑 — 并借鉴了发现模式 (search_api) 和逃生舱 (exec_jq),以便在类型化工具无法覆盖操作时,LLM 可以回退使用。
官方 | 此骨架 | |
传输 | streamable-http + sse (Cloudflare) | stdio (直接在 Claude Code 中工作) |
运行时 | 小部件 iframe 中的真实 tldraw 编辑器 | 纯 Node,编辑原始 JSON |
工具 | 2 ( | 17: 文件/页面生命周期 + 9 个形状操作 + search_api + exec_jq + ckpt |
实时预览 | 是 (小部件 iframe) | 否 (在 tldraw 中打开文件以查看) |
覆盖范围 | 整个编辑器 API | 几何 / 文本 / 箭头 + jq 逃生舱 |
已知差距
index(z-order) 仅支持在当前最大值之上追加 — 不支持插入中间无对齐 / 分布工具(使用
update_shape直接设置x/y,或使用exec_jq)无图像 / 视频 / 资产支持
模式版本固定仅供参考 — 在较新的 tldraw 中打开文件可能会触发迁移
search_api精选列表是与实时@tldraw/tlschema反射一起手动维护的
架构
src/
index.ts MCP server entry, tool registration (stdio transport)
tools.ts Tool handlers + zod input schemas
shapes.ts tldraw record factories (geo/text/arrow/group/binding)
store.ts Load/save .tldr + withFileLock; helpers (id gen, indexing, find, page-of-shape, bindings-for-shape)
template.ts Empty .tldr generator using @tldraw/tlschema serialize()
validate.ts validateShape / validateBinding using createShapeValidator + createBindingValidator
checkpoint.ts Timestamped backups under .tldraw-mcp-checkpoints/
jq.ts Shell-out to jq for the exec_jq escape hatch
test/
unit/ store + validate (13 tests)
integration/ tools end-to-end on tmp .tldr (18 tests)
contract/ loadStoreSnapshot against real @tldraw/store (4 tests)纯 JSON 操作 — 无 @tldraw/store,无 DOM,无 React。
Available Tools
18 toolsconnectA
Connect two shapes with an arrow. Arrow position is binding-driven (start/end stored as 0,0 fallback). Returns arrow id + binding ids.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| fromId | Yes | Source shape id | |
| toId | Yes | Target shape id | |
| text | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavioral traits. It notes 'arrow position is binding-driven (start/end stored as 0,0 fallback)' and that it returns 'arrow id + binding ids', which adds transparency. However, it omits details like side effects on existing connections or permission needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences. Front-loaded with the core action. No extraneous information. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description covers the purpose, a key behavioral trait, and the return value. It is adequate for the tool's simplicity, though more detail on binding behavior could improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75% (three of four parameters have descriptions). The description does not explain the 'text' parameter or add meaning beyond the schema. The return value note is helpful but not parameter-specific.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action (connect two shapes with an arrow) and the resource (shapes). It distinguishes from sibling creation tools like create_rect or create_text, as it specifically adds a connection between existing shapes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., shapes must exist) or conditions that would make other tools (like update_shape) more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_empty_fileA
Create a new empty .tldr file with one default page. Errors if file exists unless overwrite=true.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| overwrite | No | If false (default), error when file already exists |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description discloses the key behavioral trait: creating an empty file with one default page and error handling. It is transparent about the overwrite behavior, though it could further clarify what 'default page' means.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that immediately conveys the core action and key condition. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description provides all necessary information for correct invocation: file path requirement and overwrite option. Complete for the task.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds value by explaining the purpose of overwrite (error prevention) and the file content (one default page), which goes beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Create') and resource ('new empty .tldr file'), and distinguishes from sibling tools like create_page or create_rect by targeting file creation rather than shapes or pages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states the behavior when the file exists (errors) and how to override (overwrite=true), providing clear usage context. It does not explicitly mention alternatives or when not to use, but the context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_groupA
Group existing shapes into a new group. Reparents the given shape ids under a new group shape.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| childIds | Yes | Shape ids to reparent into the new group |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description correctly states that the tool reparents shapes under a new group, indicating a mutation. However, it does not disclose potential side effects such as ordering, property preservation, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no unnecessary words. The first sentence states the action, the second clarifies the mechanism. Highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Missing output schema means the agent needs to know what the tool returns (e.g., new group ID). The description does not mention return value, success indicators, or error handling, leaving a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters with descriptions. The description echoes the schema's 'reparent' phrase but adds minimal new meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool groups existing shapes into a new group by reparenting given shape ids. This distinguishes it from siblings like ungroup (reverse) and other shape creation tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. While the sibling tool 'ungroup' implies the reverse operation, the description does not clarify prerequisites or alternatives for grouping tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_pageB
Create a new page in the document. Returns the new page id.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| name | Yes | Display name for the page |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It only states the mutation (create) and return value, lacking details like side effects, whether it modifies in-place, or if it automatically saves checkpoints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, zero wasted words. Front-loaded with purpose and return value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Core purpose and return value are covered, but given the range of sibling tools, more context (e.g., that pages are top-level containers, or that the file must exist) would help prevent misuse.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for both parameters. The description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'create' and resource 'page in the document', distinguishing it from siblings like create_group or create_rect. However, 'the document' could be more specific, though the file parameter clarifies it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as create_rect or create_text. No mention of prerequisites (e.g., file must exist) or context about pages as containers.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_rectC
Create a rectangle shape on the main page. Returns its id.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| x | Yes | ||
| y | Yes | ||
| w | Yes | ||
| h | Yes | ||
| text | No | ||
| color | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It only states the basic function and return, omitting important behavioral aspects such as error handling, side effects, permissions, or constraints (e.g., coordinate limits).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise (two sentences) and front-loaded with the purpose. However, it lacks structure such as sections for parameters or usage notes, but it avoids unnecessary verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 7 parameters, no output schema, and no annotations, the description is severely incomplete. It does not explain parameter details, return value format, error conditions, or how it fits with sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not explain any parameters beyond what is in the schema. With only 14% schema description coverage, the description fails to compensate, leaving 6 out of 7 parameters undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Create), the resource (rectangle shape), the location (on the main page), and the return value (Returns its id). It distinguishes this tool from siblings like create_text or create_group.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or when not to use it. For example, it does not mention that the file must exist or that coordinates should be within bounds.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_textC
Create a text shape on the main page. Returns its id.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| x | Yes | ||
| y | Yes | ||
| text | Yes | ||
| size | No | ||
| color | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description only mentions output ('Returns its id') but does not disclose whether the tool modifies the file, any side effects, permissions required, or constraints. For a tool with no annotations, the description carries the full burden and is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence that front-loads the action and result. It is concise, but could benefit from slightly more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 6 parameters and no output schema, the description is too minimal. It lacks context about the file requirement, parameter usage, behavior, and potential errors, making it incomplete for reliable tool use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 17% (only 'file' has a description). The description does not add any explanation for parameters like 'x', 'y', 'text', 'size', 'color', leaving the agent without necessary context for proper invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create'), the resource ('text shape'), and the location ('on the main page'). It also mentions the return value ('Returns its id'). This distinguishes it from sibling tools like 'create_rect' or 'create_group'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, when not to use it, or how it differs from other creation tools (e.g., 'create_rect', 'create_group').
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_shapeC
Delete a shape by id.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| id | Yes | ||
| cascade | No | Also remove related arrow bindings and arrow shapes that lose all bindings |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, and the description does not disclose any behavioral traits such as side effects (e.g., cascade deletion), error conditions, or authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (one sentence), but the brevity sacrifices informativeness. It could be expanded without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters, no output schema, and no annotations, the description is insufficient. It fails to explain the 'cascade' parameter, required file path, or return behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no information about parameters beyond what the schema already provides. With schema coverage at 67%, the missing 'id' parameter description is not addressed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and the resource ('shape') and the identifier ('by id'). It distinguishes from sibling tools like update_shape or get_shape through the verb.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus other shape-related tools (e.g., update_shape, get_shape) or potential prerequisites (e.g., file must exist).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
exec_jqA
Escape hatch: run a jq filter against the .tldr JSON. Set write=true to persist (auto-checkpoints first).
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| filter | Yes | jq filter expression | |
| write | No | If true, write the filter result back to the file. If false, return result only. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses important behavior: auto-checkpoints before persisting, and distinguishes between preview (write=false) and modification (write=true). With no annotations, this provides useful behavioral context beyond the raw schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. The first sentence delivers the core purpose, the second provides key usage guidance. Appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers inputs and write behavior thoroughly. Lacks output description, but as an escape hatch returning jq output, this is acceptable. With no output schema, some return info would be nice but not critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining the write parameter's effect (persist) and the auto-checkpoint behavior, which is not in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it runs a jq filter against .tldr JSON content, with the phrase 'Escape hatch' indicating a generic powerful tool. This distinguishes it from sibling tools which are all specific to shapes, pages, or checkpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly explains when to set write=true (to persist) and notes auto-checkpointing, providing clear context for the write parameter. However, it does not mention when not to use this tool or suggest alternatives, though as an escape hatch it is intentionally broad.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_shapeB
Get the full record of a single shape by id.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read-only operation, the description does not explicitly state it is non-destructive or safe. This is a minor gap for a simple retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence of 10 words. It is concise and front-loaded, immediately conveying the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple retrieval tool without an output schema, the description is adequate but minimal. It does not explain what a 'full record' includes or any return format. Given low complexity, this is acceptable but could be improved.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50% (only 'file' has a description). The description adds no additional meaning for parameters; notably, the 'id' parameter lacks any description in both schema and description. The description fails to compensate for the undocumented parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get', the resource 'full record of a single shape', and the method 'by id'. It effectively distinguishes from sibling tools like 'list_shapes' which retrieve multiple shapes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for fetching a shape by ID but provides no explicit guidance on when to use this tool versus alternatives like 'list_shapes' or 'update_shape'. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_checkpointsA
List checkpoint backups for a .tldr file, newest first.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries full burden; it conveys the operation is a read-only list with ordering, but does not mention error behavior (e.g., missing file) or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no unnecessary words, front-loaded with the action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one parameter and no output schema, the description is nearly complete; only lacking a brief mention of what a checkpoint is or how to interpret results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and already describes the parameter; the description adds nothing beyond the schema, so baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list', the resource 'checkpoint backups for a .tldr file', and the ordering 'newest first', distinguishing it from sibling tools like 'save_checkpoint' and 'restore_checkpoint'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for viewing backup history but does not explicitly state when to use this tool versus alternatives (e.g., when you need to restore a checkpoint) or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pagesB
List all pages with id, name, and ordering index.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. The description implies a read operation but lacks details on side effects, authorization, or limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with verb and result fields. Efficient but bare-minimum.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one parameter and no output schema, the description is mostly adequate, though it does not specify output format or pagination.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds no extra meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list), resource (pages), and returned fields (id, name, ordering index). It differentiates from sibling tools like list_shapes and list_checkpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives, no context or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_shapesA
List shapes (id, type, x, y, label only - props omitted to save tokens).
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| type | No | Filter by shape type (geo, text, arrow, ...) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description discloses that props are omitted to save tokens, indicating a lightweight listing. However, it does not mention that the tool is read-only or any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately conveys the tool's purpose and key constraint (props omitted). No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and sibling tools, the description adequately covers what the tool returns and its filtering capability. It could mention if there is no pagination or limit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema coverage is 100%, so parameters are already documented. The description adds no extra meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List shapes' with the specific fields returned (id, type, x, y, label). It distinguishes from sibling tools like get_shape (single shape) and update_shape.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., get_shape for full details) or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
move_to_pageB
Move shapes to a different page by reparenting them. Note: arrows and bindings should move together for correctness.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| shapeIds | Yes | ||
| pageId | Yes | Target page id | |
| bindings | No | How to handle bindings whose other end isn't being moved: 'error' refuses the move, 'pull' drags the connected shapes along, 'cut' deletes the bindings (and orphan arrows). | error |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description carries full burden. It explains reparenting and warns about arrows/bindings, but lacks details on side effects, undoability, or permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with purpose, no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers core operation and a key nuance, but omits return value, prerequisites (file/ shapes exist), and error conditions. Adequate for simple usage but incomplete for complex scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Description adds minimal value beyond schema: only a note about bindings reinforcing the enum descriptions. Parameters like file, shapeIds, pageId are not elaborated beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action: move shapes to a different page by reparenting. It distinguishes from sibling tools like delete_shape or update_shape.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like update_shape or delete_shape. Does not mention prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
restore_checkpointA
Restore a checkpoint over the .tldr file. Omits checkpoint to restore the most recent.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| checkpoint | No | Checkpoint path; omit to restore the most recent |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It states 'restore over', implying overwriting the file, but does not disclose side effects (e.g., irreversible changes), required permissions, or what happens to the current state. This lack of behavioral detail leaves the agent guessing about the tool's impact.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences—first defines the main action, second clarifies the optional parameter. No redundancy, no wasted words, and information is front-loaded appropriately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 parameters, no nested objects, no output schema), the description is adequate but incomplete. It does not explain return values, error conditions, or whether the operation is destructive. Additional context would improve completeness for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with both parameters described adequately. The description's second sentence aligns with the schema's optional parameter note but adds no new meaning beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Restore a checkpoint') and the resource ('.tldr file'), with the additional detail that omitting the checkpoint restores the most recent. This effectively distinguishes it from siblings like save_checkpoint and list_checkpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when wanting to revert to a checkpoint, but provides no explicit guidance on alternatives, prerequisites, or when not to use this tool. It does not mention siblings or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_checkpointA
Copy the .tldr file to a timestamped backup. Returns the backup path.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| label | No | Optional human-readable tag (becomes part of filename) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the copy operation and return of backup path. It doesn't specify error handling or behavior if file missing, but for a simple copy, it's mostly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no wasted words. Information is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description covers the basic operation. It misses potential details like error handling or prerequisites, but is sufficient for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description does not add additional meaning beyond the schema; the 'label' parameter is already described in the schema as 'Optional human-readable tag (becomes part of filename).'
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('copy'), resource ('.tldr file'), and outcome ('timestamped backup, returns path'). It distinguishes from sibling tools like restore_checkpoint and list_checkpoints by specifying the action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for creating backups but does not explicitly state when to use it versus alternatives like restore_checkpoint or when not to use it. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_apiA
List supported tldraw shape types and their required props. Use this to discover what can be created before falling back to exec_jq.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional substring to filter shape types | |
| type | No | When verbose=true, the specific shape type to introspect | |
| verbose | No | If true, dump the live prop names from @tldraw/tlschema for the given type |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. 'List' implies a read-only operation, but the description does not explicitly state that there are no side effects or destructive actions. Basic transparency is present but could be improved.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler, front-loaded with the core action. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description does not explain the return format or default behavior (e.g., what happens when verbose=false). It provides a general idea but lacks details needed for full understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters. The description adds overall context but does not deepen understanding beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'List' and resource 'supported tldraw shape types and their required props', clearly defining the tool's purpose. It also distinguishes from sibling exec_jq by suggesting use before falling back.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a clear usage hint: 'Use this to discover what can be created before falling back to exec_jq.' This tells the agent when to use this tool versus alternatives, though it could be more explicit about when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ungroupA
Dissolve a group: reparent its children to the group's parent and delete the group shape.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| groupId | Yes | Group shape id to dissolve |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses key behavior: children are reparented to the group's parent and group is deleted. Lacks details on edge cases (no parent), but sufficient given no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence conveys all essential information without redundancy. Front-loaded action verb 'dissolve'.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequately describes behavior for a simple mutation tool with two clear parameters. No output schema, so no expectation to describe return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers both parameters fully (100%). Description does not add extra meaning beyond parameter names and types. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'dissolve' and resource 'group', clearly stating it reparents children and deletes the group. Distinguishes from sibling 'delete_shape' which would not reparent children.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use instructions. No mention of alternatives like 'delete_shape' or 'create_group'. Usage is implied by description but not guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_shapeA
Update a shape via shallow merge. Pass nested {"props": {...}} to update props.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .tldr file | |
| id | Yes | ||
| patch | Yes | Partial shape fields to merge (top-level or nested under "props") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It mentions 'shallow merge', which implies top-level field overwrites but not deep merging, and clarifies updating props via nested object. However, it does not disclose side effects, idempotency, or permission requirements, leaving gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loaded with the action, and no redundant information. Every word serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core operation and key nuance (shallow merge), but lacks details on return values, error states, or prerequisites. Given the tool's simplicity and absence of output schema, it is minimally adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds value beyond the input schema by explaining that patch supports 'shallow merge' and how to update nested props. This compensates for the schema's 67% description coverage, but the 'id' parameter remains undefined.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Update' and the resource 'shape', specifying the method as 'shallow merge'. It effectively distinguishes from sibling tools like create_shape, delete_shape, and get_shape by implying a mutation operation on an existing shape.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide guidance on when to use this tool versus alternatives, such as move_to_page or delete_shape. It lacks explicit when-to-use, when-not-to-use, or prerequisite information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
18 tool updates
v0.1.0- First observed
connect - First observed
create_empty_file - First observed
create_group - First observed
create_page - First observed
create_rect - First observed
create_text - First observed
delete_shape - First observed
exec_jq - First observed
get_shape - First observed
list_checkpoints - First observed
list_pages - First observed
list_shapes - First observed
move_to_page - First observed
restore_checkpoint - First observed
save_checkpoint - First observed
search_api - First observed
ungroup - First observed
update_shape
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose, from creating shapes and pages to managing checkpoints and connecting shapes. The exec_jq escape hatch is intentionally broad but its role as a fallback is well-documented, avoiding confusion.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_rect, list_pages, update_shape). No mixed conventions or ambiguous verbs.
With 18 tools, the set is well-scoped for a drawing application: it covers shape CRUD, grouping, pages, checkpoints, and an escape hatch. The count feels complete without being overwhelming.
The toolset covers core operations but misses explicit tools for creating non-rectangle shapes (e.g., ellipses, lines). However, search_api and exec_jq fill these gaps, so agents can still achieve full functionality.
Maintenance
Related MCP Connectors
Collaborative whiteboard MCP server — create objects, connectors, C4 diagrams, and manage boards
A simple MCP server built with FastMCP and python
Related MCP Servers
- AlicenseAqualityDmaintenanceA minimal MCP server for AI-driven canvas manipulation and visualization using tldraw. It enables AI clients to programmatically create, update, and manage shapes, flowcharts, and frames on a live interactive canvas.91MIT
- AlicenseAqualityAmaintenanceLocal-first MCP server for working with an Obsidian vault. No API key required1714MIT
- AlicenseNot gradedqualityAmaintenanceA Codex stdio MCP server that generates simple tldraw product workflow diagrams as .tldr files.227 npm26MIT
- AlicenseAqualityAmaintenanceA portable MCP server for headless Penpot project/file/content management, using Penpot's RPC API directly. No browser, no Penpot plugin session.5412 npm1MIT