Skip to main content
Glama

Update Document

update_document
DestructiveIdempotent

Replace the content, type, or title of an existing document you own, addressed by slug. Overwrites rather than appends, so it is non-additive; re-running with the same arguments yields the same result. Pass if_match (the revision from a read) to refuse the write if the document changed since you read it. To change only part of a document, prefer edit_document or append_to_document when they are available. If the result lists warnings about parts of an HTML page that will not work for viewers, tell the user about them in plain words, skip any technical names, and offer to make the fix.

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

Input Schema

NameRequiredDescriptionDefault
slugYesThe slug of the document to update
titleNoNew document title
contentNoNew document content
if_matchNoOptional revision (such as "r12") from your last read. If the document has changed since, nothing is written.
content_typeNoNew content type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes beyond the annotations (which already declare destructive and idempotent) by spelling out overwrite semantics, optimistic concurrency via if_match with the consequence that 'nothing is written', and how to relay HTML warning output to the user. The annotation profile and the described behavior are consistent.

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 core action and its destructive/overwrite nature are front-loaded, and the alternative-routing line follows logically. Slight redundancy in re-explaining idempotency ('re-running with the same arguments yields the same result') that idempotentHint already conveys, and the closing warning-handling sentence is a bit long.

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 no output schema, the definition covers the important edges: what gets replaced, conflict handling, and how to surface partial-failure warnings from the result. Nothing an agent needs to call it correctly appears to be missing.

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 100%, so all five parameters, including the if_match revision format and the content_type enum, are already documented. The description's if_match sentence largely restates the schema, adding only the framing that the revision comes from a read; that is baseline-plus rather than new semantics.

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?

States a specific verb and resource ('Replace the content, type, or title of an existing document') plus the addressing key ('by slug') and ownership scope ('you own'). The overwrite-vs-append contrast makes it immediately distinguishable from append_to_document and edit_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes partial changes to edit_document or append_to_document, and explains the if_match pattern for refusing a write when the document changed since the last read. Both the when-to-use and when-to-use-something-else conditions are stated.

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.