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 and older ones are deleted. The document's cached summary is cleared. 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.6/5.0
Behavior5/5

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

Beyond the destructive/idempotent annotations, it discloses revision retention (ten most recent kept, older deleted), that the cached summary is cleared, and the confirm-gate behavior: without `confirm: true` nothing changes and the response reports who would see the new text. That is exactly the mutation-risk context an agent needs before calling.

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?

The action and preservation guarantees are front-loaded, followed by usage trigger, revision policy, and the confirm requirement in a logical order. Each sentence carries distinct information with no filler.

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 four-parameter mutation with no output schema, this covers nearly everything: retention policy, cache clearing, and the confirm workflow. The only gap is what a successful response contains (revision id, updated link/metadata), which is left unspecified.

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, but the description adds consequences not in the schema: `markdown` must be the complete replacement text, and omitting `confirm` on a shared document is a silent no-op with an informative response. `name` is left to the schema, which already documents it adequately.

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?

The description opens with a precise verb and resource ('Replaces the text of an existing document') and immediately scopes what is preserved (id, link, sharing, password, expiry), which separates it from creation/save-style siblings. An agent can tell what it does without opening the 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 gives an explicit trigger ('when the user asks to change, fix, extend or rewrite a document that is already on the account, including one they have shared') plus a no-op exclusion ('Sending the current text again changes nothing'). It stops short of naming a sibling alternative (e.g., save vs. update), so the agent must infer routing from names alone.

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.