Skip to main content
Glama

write_doc

Create a markdown project doc — spec, plan, start prompt, conventions, or working note — or replace an existing one by id. Stores it in Tares and returns the doc id.

Instructions

Write a markdown doc into the project, or replace one when id is given. kind is one of: start (the prompt a session that builds the project starts with: what to read first, which ticket to take, how to work), spec (what is built and why), plan (milestones and the order of work), agents (the AGENTS.md of the build: conventions, commands, how to test), working (the working doc of one ticket: context, steps, files likely touched, how to verify; link it with attach_working_doc), note (anything else). Working docs and every other doc stay in Tares; they never go to Linear or GitHub. A rule or fact that holds for every project goes in the shared docs with add_to_global instead. Returns the doc's id.

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": {
      "kind": "<kind>",
      "title": "<title>",
      "body": "<body>"
    },
    "name": "write_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
bodyYes
kindYes
titleYes
projectNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.57.0

TDQS

A4/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 disclose the key traits: passing `id` overwrites an existing doc, docs persist in Tares and never sync to Linear or GitHub, and the call returns the doc's id. It does not describe what happens on an invalid `id`, whether a missing id auto-creates, or any 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.

Conciseness4/5

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

The create-or-replace rule is front-loaded in the first clause, and the long `kind` enumeration earns its length because the schema carries no enum or descriptions. The parenthetical kind glossary is dense but readable; a minor trim is possible in the persistence sentence.

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?

The tool is a five-parameter mutation with no annotations, so the description should cover more behavioral surface than it does. Return values need not be explained because an output schema exists, but the unexplained `project` parameter, absent error/invalid-id behavior, and no statement of permission needs leave real gaps for a write operation.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate: it does so well for `kind` (five-and-a-half enumerated values explained in prose, despite the schema declaring no enum) and for `id` (replace semantics). However, `project` and `title` receive no explanation, and `body` is only implied to be markdown, leaving two of five parameters undocumented anywhere.

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 gives a specific verb+resource pair ('write a markdown doc into the project') and immediately states the replace variant selected by `id`. It also distinguishes the tool from add_to_global and attach_working_doc, so an agent can tell which sibling handles global rules versus ticket linkage.

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?

It supplies genuine routing guidance by explaining what each `kind` is for (start, spec, plan, agents, working, note) and by naming add_to_global for cross-project rules. It stops short of stating when to prefer write_ticket or write_milestone over a `note`, so the boundary with the other write_* siblings is left implicit.

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