Skip to main content
Glama

Write documentation

update_document
Idempotent

Write the documentation and declare the integrated sources, with the version you read (and, for a task, the number of log entries read).

Without content, declares sources you read that contribute nothing. expected_version is the version read with get_document; on a conflict, read it again and reapply your change. The content keeps the outline's headings.

With section, content carries only that section, heading included, and nothing of another: the rest of the documentation is kept intact, without you retyping it. expected_version remains that of the whole documentation.

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": {
      "space": "<space>",
      "name": "<name>",
      "expected_version": "<expected_version>"
    },
    "name": "update_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName of the documentation in the space, e.g. “fonctionnalites”.
spaceYesSpace identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces.
contentNo
sectionNo
integratedNo
expected_versionYes

Output Schema

NameRequiredDescriptionDefault
nameYes
versionYes
integratedYes
pending_countYesSources still pending after this call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / $defs / IntegratedIn / properties / id / description
      Previous value: -"Id de la note ou de la tâche."New value: +"Id of the note or task."
    • changedInput schema / $defs / IntegratedIn / properties / log_entries / description
      Previous value: -"Tâche : nombre d'entrées de journal lues."New value: +"Task: number of log entries read."
    • changedInput schema / $defs / IntegratedIn / properties / version / description
      Previous value: -"Version que tu as lue (pas forcément la courante)."New value: +"Version you read (not necessarily the current one)."
    • changedInput schema / properties / name / description
      Previous value: -"Nom de la documentation dans l'espace, ex. « fonctionnalites »."New value: +"Name of the documentation in the space, e.g. “fonctionnalites”."
    • changedInput schema / properties / section / anyOf
      Previous value: -[
      -  {
      -    "description": "Titre de section du plan (`outline`), pour ne lire ou n'écrire que celle-là.",
      -    "maxLength": 120,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Section heading from the outline (`outline`), to read or write only that section.",
      +    "maxLength": 120,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / space / description
      Previous value: -"Identifiant de l'espace, ex. « k3x9p2m4ta » : le champ `id` que donne list_spaces."New value: +"Space identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces."
    • changedOutput schema / properties / pending_count / description
      Previous value: -"Sources encore en attente après cet appel."New value: +"Sources still pending after this call."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (not read-only, idempotent, non-destructive, closed-world), so the description's added value is what it discloses about side effects: unspecified sections are preserved intact without retyping, content must retain the outline's headings, and version conflicts require re-read and reapply. That is meaningful operational context that annotations alone do not 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?

Three short paragraphs, each front-loaded with its mode, with no filler. The opening sentence is syntactically crowded ("with the version you read (and, for a task, the number of log entries read)") and takes a re-read to parse, which costs some clarity against an otherwise tight structure.

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 six-parameter mutation tool with modal behavior and a low-coverage schema, the definition covers the decision points an agent needs: mode selection, version-conflict recovery, and preservation of untouched content. An output schema exists, so return-value explanation is rightly absent; the only minor gap is the absence of any note about the creating case versus an existing document.

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 33%, so the description must carry weight, and it does: it defines the semantics of `content` (full document, keeping outline headings), `section` (only that section's heading and body, everything else preserved), `expected_version` (the version read via get_document, always the whole-document version), and the `integrated` source declarations with their read versions. Only `space` and `name` are left to the schema, which already documents them well.

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

Purpose4/5

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

The definition states a concrete verb and resource ("Write the documentation") and immediately describes its two operating modes: whole-document write and single-section write. It implicitly distinguishes itself from the read sibling by tying `expected_version` to `get_document`. The phrasing "declare the integrated sources" is unusual jargon that slightly blurs the core purpose of updating existing documentation versus creating one.

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 gives conditional usage contexts: omit `content` to only declare sources, supply `section` to touch only one section, and it names the recovery path when `expected_version` conflicts (re-read with get_document and reapply). No guidance is offered on when to prefer this over a create/archive sibling, but the mode selection is otherwise clear.

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.

Resources