Skip to main content
Glama

create_doc

Create a new document draft under docs/ using a type-specific template, generating doc.md content and doc.json metadata so you can start writing and later finalize a versioned PRD or release note.

Instructions

在 docs/ 下新建一个文档:docs//(doc.md 工作草稿 + doc.json)。kind 是文档类型(doc-kinds// 目录,如 prd、release-note;未知类型报错并列出可用的)。docId(= 目录名)默认 = kind 名(docs/prd/、docs/release-note/),一个项目一种类型一篇是常态;同类型要多篇时才显式传 docId(可含中文)。title 是这篇文档的主题一句话——不带项目名、不带「PRD」之类类型字样、不带版本号(项目上下文由所在项目给,类型和版本号画布菜单单独展示);传了会直接填进 doc.md 的一级标题和 doc.json.title,省得建完再手改,不影响目录名。from 记来源(如 from:"prd" 基于 prd 文档 head 版本、from:"prd@3" 指定版本),写进 doc.json.origin,之后上游出新版本 chain_status 会提示。doc.md 按该类型的 template.md 起草——起草完写正文,再 build_doc(mode:"finalize", note:"…") 定第一个版本

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses error behavior for unknown kinds, default naming behavior, side effects of title on doc.md and doc.json, and from being recorded in doc.json.origin affecting chain_status. It does not state overwrite behavior when docId already exists, which is a minor gap.

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 purpose is front-loaded and every clause adds necessary operational detail without filler. It is a single dense run-on paragraph and would benefit from bullet structure, but it remains efficient for the amount of behavior it needs to convey.

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?

The description covers all parameters, default behavior, error behavior, file layout, and the next workflow step (build_doc finalize). There is no output schema, but the deterministic file structure and side effects make the result predictable. It lacks explicit mention of the return value or overwrite behavior, but overall it is complete enough for correct invocation.

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 description coverage is only 33%, but the description compensates fully by explaining kind (directory, defaults, errors), docId (default and when to override), title (content constraints and side effects), and from (examples, version semantics, origin field). dir and projectId are already described in the schema, so all parameters are effectively covered.

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?

The description opens with a concrete action: creating a new document under docs/ with docs/<docId>/ containing doc.md and doc.json. It clearly identifies the tool's scope and differentiates it from siblings like build_doc by describing creation versus finalization, while detailing kind/docId/title/from semantics.

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 clear usage conditions: docId defaults to the kind name, explicit docId is only needed for multiple docs of the same type, unknown kinds error out and list available kinds, and the description ends by routing the agent to build_doc(mode:'finalize') for the first version. It lacks explicit 'do not use this tool when...' exclusions but the context is clear.

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