Skip to main content
Glama

Coline

Rewrite a doc

update_doc
DestructiveIdempotent

Replaces a doc's title and text. Pass the revision from get_doc as baseRevision and a new UUID as mutationId, and reuse both on a retry; a conflict means the person changed it since, so read it again and keep their work.

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": {
      "workspace": "<workspace>",
      "docId": "<docId>",
      "title": "<title>",
      "content": "<content>",
      "baseRevision": "<baseRevision>",
      "mutationId": "<mutationId>"
    },
    "name": "update_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
docIdYesDoc id from search, fetch or create_doc.
titleYes
layoutNoPage layout from get_doc; default keeps it.
contentYes
workspaceYesWorkspace slug from workspaces.list, e.g. "acme".
mutationIdYes
baseRevisionYes

Output Schema

NameRequiredDescriptionDefault
urlYes
textYes
docIdYes
titleYes
revisionYes
textTruncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds real value beyond them: it explains that mutationId makes retries safe, that a conflict signals a concurrent human edit, and that the correct recovery is to re-read and preserve their work. It stops short of stating permission requirements or what the response contains.

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?

Two sentences, no filler, with the destructive action stated first and the retry/conflict protocol immediately after. Every clause carries operational information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with an output schema already covering return values, the description supplies the missing pieces: concurrency control, retry idempotency, and conflict recovery. An agent can call this correctly and handle the failure mode without further documentation.

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 only 43% across 7 parameters, so the description must compensate, and it does for the two least obvious ones: baseRevision is sourced from get_doc and mutationId must be a fresh UUID reused on retry. The remaining parameters (title, content, layout) are left to the schema, which is a minor gap given their self-evident nature.

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 description opens with a specific verb and resource: 'Replaces a doc's title and text,' which tells an agent exactly what is mutated and that it is a full overwrite rather than a patch. It does not explicitly distinguish itself from the sibling save_doc, so it falls short of a 5.

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 a concrete precondition workflow: obtain the revision from get_doc, pass it as baseRevision, and re-read on conflict. That is clear when-and-how guidance, but it never states when to prefer this tool over save_doc or create_doc, so no explicit alternative routing is provided.

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