Skip to main content
Glama

build_doc

Create versioned documentation by snapshotting referenced board states, then finalize to validate assets, freeze versions, and regenerate preview pages.

Instructions

构建文档版本,两阶段。snapshot:读 docs//.build/captures.json(这个文档要截哪些画板的哪些状态),冻结引用到的画板进 .build/snapshot/,供 build_publish_pack 截图(只有用画布截图当上下文的类型才需要,如 PRD/上线公告)。finalize:doc.md 已手写好、(用截图流水线的话)截图已 seal——校验 引用是否都落地、算指纹、冻结成 versions//、按 note 自动重生成修改记录表重渲染 docs//preview.html(文档阅读页是冻结版本内容的产物,仍然落盘)、跑该类型的 checks。note 必填(一句话说清这次改了什么,进修改记录表;不写版本号)。纯 prose 改动可直接 finalize,复用已有 .build/ 产物。返回的 url(http://127.0.0.1)是打开方式,findings 里 error 级会在 record_publish 拦截发布

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and it delivers: it details side effects (freezing artboards to .build/snapshot/, creating versions/<n>/, re-rendering preview.html), prerequisites (doc.md written, screenshots sealed), the constraint that note is required and must not include a version number, and that error-level findings block publication at record_publish. This exceeds what the schema or annotations convey.

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 but every sentence carries operational value — mode semantics, prerequisites, side effects, output semantics. It is front-loaded with the core purpose ('构建文档版本,两阶段'), though the single-paragraph wall of text would benefit from bullet separation for the two modes.

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

Completeness4/5

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

For a 7-parameter mutation tool with no output schema, the description covers inputs, workflow, prerequisites, side effects, return url, and downstream gating by record_publish. It does not fully specify what 'checks' run or what label/author mean, but overall the agent has enough context to invoke both modes correctly.

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

Parameters4/5

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

Schema description coverage is only 29% (dir and projectId documented). The description compensates substantially for mode, explaining both enum values in detail, and for note, adding the requiredness, single-sentence rule, and purpose in the modification table. docId's meaning is implied through file paths. However, label and author receive no explanation in either schema or description, so it does not fully compensate.

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

Purpose5/5

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

Description opens with '构建文档版本,两阶段' (build document version, two stages) — a specific verb+resource+process. It names the two modes, snapshot and finalize, and references the sibling tools build_publish_pack and record_publish, situating build_doc in the workflow. This lets an agent distinguish it from create_doc or export_doc.

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

Usage Guidelines4/5

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

Provides explicit guidance on when each mode applies: snapshot only for doc types needing canvas screenshots, finalize after doc.md is hand-written and screenshots sealed, and pure prose changes can finalize directly reusing .build/ artifacts. It does not explicitly list alternative tools to choose instead, but the mode-level workflow is clear.

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