Skip to main content
Glama

Update doc

update_doc
Destructive

Change a doc's text and nothing else in it. One passage: old_text and new_text. Add to the end: append_text. The whole body: content and updated_at from your read_doc, refused when anyone edited it since, so you never overwrite the team. The text it replaces stays in the doc's version history. Presentations and storyboards change only through a task.

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": {
      "doc_id": "<doc_id>"
    },
    "name": "update_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYesA doc id from get_task or list_space.
contentNoThe new whole doc body as Markdown.
new_textNoWhat replaces old_text. Empty deletes it.
old_textNoThe passage, copied exactly from read_doc. It must appear once: add nearby words if it repeats.
updated_atNoupdated_at from your read_doc. Needed with content; otherwise it refuses a doc edited since.
append_textNoMarkdown to add at the end of the doc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, and the description usefully softens that by disclosing that replaced text remains in version history. It also explains the optimistic-concurrency refusal on stale updated_at, which is real behavioral context the annotations cannot convey. However, it does not cover permission/auth requirements, return values, or what happens when a mode's parameters are miscombined.

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?

Front-loaded with the core constraint and organized as mode-to-parameter mappings, so an agent can parse it quickly. The telegraphic fragment style ("One passage: old_text and new_text") is compact but borders on cryptic for the append/whole-body distinction.

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 no output schema, the description covers the critical call-correctness concerns: mode selection, concurrency protection, and history retention. Missing are error/permission behavior and any statement about what a successful call yields, which keeps it short of fully complete.

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 description coverage is 100%, so the schema already documents each parameter's meaning, which sets the baseline at 3. The description does add value by grouping the six parameters into three mutually exclusive edit modes and by pairing content with updated_at, but it repeats the old_text/new_text definitions rather than adding syntax or conflict detail beyond the schema.

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?

"Change a doc's text and nothing else in it" states a specific verb, resource, and an explicit scope boundary, then enumerates the three edit modes (passage replace, append, whole-body). This is clearly distinguishable from metadata-oriented siblings such as update_doc_info without opening any schema.

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 maps each intent to a parameter combination ("One passage: old_text and new_text", "Add to the end: append_text", "The whole body: content and updated_at"), and excludes presentations/storyboards, routing them to a task instead. The one gap is that it never names the sibling to use for doc metadata or title/name changes.

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