Skip to main content
Glama
ShadowGit MCP Server

ShadowGit MCP Server

Write docs pages

write_docs
DestructiveIdempotent

Generate and update structured documentation pages from code and ShadowGit history, with summaries, linked symbols or areas, and unchanged content preserved at the current head.

Instructions

Write the words of docs pages get_docs read, at the head it answered. For each page, an area by its id or overview: true, then a summary, one sentence on what it is for (at most 200 characters), and a body, short paragraphs on how it works (at most 400 words), each paragraph text or pieces, a piece linking a symbol (its file and name, as get_docs and get_code_context name them) or an area by its id, where the text names it. Or holds: true, when the words still hold after the changes get_docs listed: they are kept again at head, unchanged. Describe what the code does and how it works, from the code you read and the facts get_docs gave: a page with no words can start short, and later sessions add to it. Links that name nothing at head are made plain text and named back. A page past these limits is left out, with why; the others are kept. ShadowGit keeps every version in its own history, never in the project's files.

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": {
      "head": "<head>",
      "pages": "<pages>"
    },
    "name": "write_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
headYesThe head get_docs answered
repoNoProject name or absolute path. Defaults to the current project.
pagesYes

Output Schema

NameRequiredDescriptionDefault
headYes
leftNoPages left out before they were kept: their words past the app's rules
repoYes
pagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.9.0
    • addedOutput schema / properties / left
      Added value: +{
      +  "description": "Pages left out before they were kept: their words past the app's rules",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "page": {
      +        "anyOf": [
      +          {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "area": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "area"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "overview": {
      +                    "const": true,
      +                    "type": "boolean"
      +                  }
      +                },
      +                "required": [
      +                  "overview"
      +                ],
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "why": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "page",
      +      "why"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Addedv2.6.1

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the annotations, it discloses real behavior: pages exceeding the limits are dropped with a reason while the rest are kept, dangling links are converted to plain text, and ShadowGit stores every version in its own history rather than the project's files. That last point importantly delimits the blast radius of a tool flagged destructiveHint=true, and the partial-failure behavior is valuable context the annotations cannot convey.

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

Conciseness3/5

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

The content is front-loaded and information-dense, but the prose is written in a terse, elliptical style ("at the head it answered," "the words still hold") that forces re-reading. Several clauses could be split into shorter, plainer sentences without losing 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?

An output schema exists so return values need not be explained, and the description covers the prerequisites (a head from `get_docs`), the content limits, partial-failure handling, link normalization, and versioning. What remains thin is the guidance on what distinguishes this tool from `write_lens_words` in a multi-write-tool workflow.

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?

The description adds meaning the 67%-covered schema does not: `summary` is capped at 200 characters, `body` at 400 words, `area` may be replaced by `overview: true`, body pieces may link a symbol (file + name) or an area id only where the text names it, and `holds: true` means unchanged carry-forward. The limits and the linking rule are substantive additions beyond the schema.

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

Purpose3/5

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

The verb and resource are present ("Write the words of docs pages get_docs read"), so an agent knows it creates documentation pages, but the phrasing is convoluted and never explicitly distinguishes this from the sibling `write_lens_words`. The dependency on a prior `get_docs` call is the clearest identifying signal, which is useful but indirect.

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?

Usage is implied through the workflow: use the head returned by `get_docs`, derive content "from the code you read and the facts get_docs gave," and set `holds: true` when existing words survive the listed changes. There is no explicit when-not-to-use guidance and no direct comparison to `write_lens_words` or other siblings.

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