Skip to main content
Glama

Write doc

write_doc

WRITES a doc from Markdown. Without card_id it adds a new doc card (in free space, in group, or at the top-left); with card_id it adds pages to that doc, after its pages or under parent_page_id. Headings, lists, checklists (- [ ] / - [x]), tables, quotes, code, links, ==highlight== and underline carry over. A picture is placed only from a file already on the board, as caption (image_key from read_board); other pictures become links.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "board_id": "<board_id>",
      "pages": "<pages>"
    },
    "name": "write_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
hNoA new doc's height, default 240
wNoA new doc's width, default 320
xNoA new doc's left edge; x and y left out, free space
yNoA new doc's top edge
draftNoThe draft key create_boards returned. Pass it on every call about that draft.
groupNoA new doc's section (made if missing)
pagesYesThe pages, in order
titleNoA new doc's title; left out, its one page's title
card_idNoA doc card to add the pages to; left out, a new doc
board_idYesThe board
positionNo"top": top-left, ahead of the sections (not with group, x, y)
parent_page_idNoWith card_id: the page these go under

Output Schema

NameRequiredDescriptionDefault
urlNo
pagesNo
groupsNo
card_idNo
createdNo
board_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / draft
      Added value: +{
      +  "description": "The draft key create_boards returned. Pass it on every call about that draft.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only give the generic non-read-only, non-destructive, non-idempotent profile; the description adds real substance beyond that: which Markdown constructs survive conversion, the constraint that images must already exist on the board and must be referenced as ![caption](r2:<image_key>) with the key obtained from read_board, and that other images degrade to links. These are non-obvious behavioral limits an agent would otherwise discover only by failing.

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

Conciseness5/5

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

Four sentences, front-loaded with the verb and the branching rule, then formatting support, then the image caveat. No restatement of the name or title, and every clause carries operational information.

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 12-parameter mutation tool with an output schema and full annotation coverage, the description covers the mode split, placement options, content fidelity, and the one hard constraint (images). The draft-workflow parameter is left entirely to the schema, which is acceptable given its self-describing text, but the description could have noted that repeated calls append rather than replace.

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 coverage is 100%, so the baseline is 3, but the description genuinely adds interaction semantics the schema does not state: the mutual exclusion of position with group/x/y, the meaning of omitting x and y (free space), and the parent_page_id-only-with-card_id relationship. Minor gaps remain for draft, but the mode-defining parameters are clarified beyond the schema text.

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 specific verb and resource ("WRITES a doc from Markdown") and immediately splits the tool into two distinct modes: creating a new doc card when card_id is absent, and appending pages when card_id is present. An agent can tell exactly what this does versus siblings like edit_doc_page or add_cards.

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?

The card_id branch is an explicit when-to-use rule (no card_id = new doc; card_id = add pages to that doc), and the position enum is scoped with "not with group, x, y". It stops short of naming sibling alternatives such as edit_doc_page for modifying existing page content, so routing between write_doc and edit_doc_page still requires inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.