Skip to main content
Glama

write_annotations

Writes design annotations to an artboard using markdown with section headings and clickable element links, or text patches, validating referenced element IDs against the latest source.

Instructions

写这块画板的标注。md(annotations.md 全文)与 edits(补丁 [{oldText,newText}])二选一,跟 save_artboard_source 一个套路。md 是一篇 markdown,写法像一节 spec:分区用 ## 标题、一条说明用 ### 标题;正文里想让读者点击定位到某元素就写内联链接 显示名——显示名要用人话(这东西在界面上是什么、可见文字或角色,如「折叠按钮」「候选人卡片列表」),别拿元素 id / class 名 / 内部代号当显示名;#el/元素id 里的 id 才从 elementIds 照抄。顺序 = 文档顺序、分组 = 标题,没有 groupId / order / revision。可选 refs:{ 元素id: { interactionPath:[{type:'click'或'hover',selector,index?}] } },仅当某个被引用的元素要交互之后才在 DOM 里时才需要。md 里 名 引用了当前源码没有的元素 id → REF_NOT_FOUND,整个拒绝。成功自动把 meta.annotationsValidatedHash 盖成当前源码指纹。标注是 annotations.md 的实时投影——刷新已打开的画布标签即最新

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mdNo
dirNo覆盖默认工作目录(项目所在父目录);相对路径按当前工作目录解析;缺省用 PROTOFLOW_HOME 或启动时的 cwd
refsNo
editsNo
projectIdYes项目 id(同时也是项目文件夹名)
artboardIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses the md/edits exclusivity, the absence of groupId/order/revision, all-or-nothing rejection on REF_NOT_FOUND, automatic setting of meta.annotationsValidatedHash, and real-time projection/refresh behavior. It omits return value and explicit overwrite semantics, but the disclosed side effects are substantial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and monolithic, but nearly every clause adds operational information, and the first sentence front-loads purpose and the md/edits choice. A bulleted layout would improve scannability, but there is little wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex write tool with no output schema, it covers formatting, validation, side effects, and freshness thoroughly. However, it never states what the tool returns or confirms on success, and it assumes the agent already knows where to find elementIds/current source, leaving a couple of invocation-critical facts implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%, and the description compensates strongly: it explains md's markdown/spec structure, display-name rules, link syntax, the edit patch shape, refs structure with interactionPath, and that element ids must be copied from elementIds. Previously undocumented parameters receive concrete, usable meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with '写这块画板的标注' (write annotations for this artboard), giving a specific verb and resource, and immediately clarifies the two payload modes (md vs edits). It does not explicitly distinguish itself from siblings like get_annotations or save_artboard_source, but the core action is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There are rich internal usage rules: md vs edits are mutually exclusive, refs are only needed for elements appearing after interaction, and invalid references trigger REF_NOT_FOUND. However, the description never states when to choose this tool over related siblings such as get_annotations for reading or save_artboard_source for writing source, so cross-tool selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.