Skip to main content
Glama

Update a document

tp_update_document
DestructiveIdempotent

Replaces the text of an existing document and keeps its id, link, sharing settings, password and expiry. Use it when the user asks to change, fix, extend or rewrite a document that is already on the account, including one they have shared. markdown is the complete new text. The previous text is kept as a revision; the ten most recent revisions are kept. When the document is shared by link or with people, confirm: true is required, because its readers will see the new text; without it nothing changes and the response says who would see it. Sending the current text again changes nothing.

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": {
      "id": "<id>",
      "markdown": "<markdown>"
    },
    "name": "tp_update_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDocument id from tp_list_documents.
nameNoA new file name. Omit to keep the current one.
confirmNoRequired when the document is shared by link or with people. Set true after the user has agreed that its readers will see the new text.
markdownYesThe complete new text, as Markdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the prior text becomes a revision with a ten-revision retention limit, unconfirmed updates on shared documents are a no-op that reports the would-be audience, and resubmitting identical text changes nothing, which corroborates the idempotentHint. The destructive-but-recoverable nature (destructiveHint=true plus revision history) is made explicit in a way the annotations alone 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.

Conciseness5/5

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

Front-loads the core operation and its preservation guarantees, then moves to the trigger condition, the revision behavior, the confirm gate, and the no-op case in a tight sequence. Every sentence carries new information; nothing is repeated from the title or schema verbatim.

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 destructive mutation with no output schema, the definition covers recovery (revisions), the authorization gate for shared documents, and the observable response ('the response says who would see it'). It does not describe what the response looks like for unshared documents or the effect of renaming via name, a minor gap.

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 100%, so the baseline is 3; the description nonetheless adds meaning by clarifying that markdown is the entire replacement text (not a patch) and explaining why confirm exists and what happens without it. It omits the optional name parameter entirely, so part of the surface is left to the schema.

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?

States a specific verb and resource ('Replaces the text of an existing document') and enumerates what is preserved (id, link, sharing settings, password, expiry), which distinguishes it from a create and from read-only siblings like tp_get_document. It never distinguishes itself from tp_save_document, which is the closest sibling, leaving an ambiguity an agent must resolve on its own.

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?

Gives a concrete trigger condition ('when the user asks to change, fix, extend or rewrite a document that is already on the account') and spells out the confirm prerequisite along with the consequence of omitting it. It stops short of naming an alternative tool for the cases where this one is wrong, such as save vs. update.

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.