Skip to main content
Glama

update_document

DestructiveIdempotent

Update a document (partial). Stamps updated_at. Also files a document against a record after the fact: pass entity + entity_id together (both, never one) to attach a previously unfiled upload once you know where it belongs, or both as null to detach it again. The target record is checked against the tenant first.

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

Input Schema

NameRequiredDescriptionDefault
urlNoNew external link of the document
titleNoTitle of the document
amountNoAmount
entityNoFile it against a record: lead|contact|account|campaign|user|asbest_project|raumbuchung_booking. Pass together with entity_id, or both null to detach.
statusNoNew status
currencyNoCurrency code (ISO 4217, e.g. EUR)
doc_typeNoNew document type
entity_idNoRecord id — always together with entity.
descriptionNoDescription of the document
document_idYesID of the document to change
occurred_atNoWhen it happened (ISO 8601)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"Amount"
    • addedInput schema / properties / currency / description
      Added value: +"Currency code (ISO 4217, e.g. EUR)"
    • addedInput schema / properties / description / description
      Added value: +"Description of the document"
    • addedInput schema / properties / doc_type / description
      Added value: +"New document type"
    • addedInput schema / properties / document_id / description
      Added value: +"ID of the document to change"
    • addedInput schema / properties / occurred_at / description
      Added value: +"When it happened (ISO 8601)"
    • addedInput schema / properties / status / description
      Added value: +"New status"
    • addedInput schema / properties / title / description
      Added value: +"Title of the document"
    • addedInput schema / properties / url / description
      Added value: +"New external link of the document"
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

The description adds genuine behavior beyond the annotations: it is a partial update, it stamps updated_at, and the target record is validated against the tenant before attaching. However, annotations declare destructiveHint=true and the description never explains what is destroyed or overwritten (e.g. whether detaching removes an existing link, or whether supplying a field clears prior values). With annotations carrying the safety profile, a 3 is the right level – some added context, a notable unexplained destructive flag.

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?

Three tight sentences, with the core update behavior and the updated_at side effect front-loaded before the more involved filing/detaching case. The middle sentence is clause-heavy ('Also files a document against a record after the fact: pass entity + entity_id together...') but every clause carries usable information. Nothing is redundant.

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 an 11-parameter mutation tool with full schema coverage and no output schema, the description covers the two modes of operation and the one cross-parameter dependency that would otherwise cause silent misuse. What remains missing is only the destructive/overwrite semantics implied by the annotations, which is a modest gap given the rich schema.

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 enforceable semantics beyond the schema by insisting entity and entity_id be passed together and 'never one' — a constraint the schema only states per-field. The 'both as null to detach' case is also spelled out at the tool level rather than buried in a property. The remaining nine parameters get no added meaning, but the schema already documents them.

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 ('Update a document (partial)') and names a distinct second capability (filing/detaching an existing upload against a record). An agent can tell this apart from add_document, delete_document or the upload/render siblings. It stops short of explicitly naming a contrasting sibling, which keeps it from 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 states clearly when to use the filing mode: 'after the fact ... once you know where it belongs', and when to use the null variant: 'to detach it again'. That is real conditional guidance rather than implied usage. It gives no guidance on when to prefer this over, say, add_document, and nothing about partial-update ordering or prerequisites.

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.