Skip to main content
Glama

update_document

Update a document's title, tags, correspondent, or custom fields; omitted fields stay unchanged. However, custom fields replace the full set.

Instructions

Update a specific document with new values (title, correspondent, document type, storage path, tags, custom fields, and more). Top-level fields you omit are left unchanged. IMPORTANT: custom_fields is the exception — see its parameter description; it replaces the document's entire custom-field set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the document to update
tagsNoArray of tag IDs to assign to the document
ownerNoThe ID of the user who owns the document
titleNoThe new title for the document (max 128 characters)
contentNoThe raw text content of the document (used for searching)
createdNoThe creation date in YYYY-MM-DD format
storage_pathNoThe ID of the storage path to assign
correspondentNoThe ID of the correspondent to assign
custom_fieldsNoCustom field values for the document. ⚠️ REPLACES the document's entire custom-field set — any field not included here will be CLEARED. To update or add a single field without losing the others, first call get_document to read the existing custom_fields, then pass the full merged array. To add/set fields additively without fetching, use bulk_edit_documents with method 'modify_custom_fields' instead.
document_typeNoThe ID of the document type to assign
archive_serial_numberNoThe archive serial number (0-4294967295)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and does well: it discloses PATCH-style merge semantics ("Top-level fields you omit are left unchanged") and the destructive exception (custom_fields replaces the entire set, omitting a field CLEARS it), plus the merge workflow to avoid data loss. It does not mention permission requirements, error behavior for invalid IDs, or reversibility.

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?

Three sentences, front-loaded with the operation and its default semantics, then the critical exception flagged with IMPORTANT. Nothing is redundant with the schema and every sentence earns its place.

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 no annotations and no output schema, the description covers the two behaviors most likely to cause damage (partial update semantics and the custom-field wipe) and links to the mitigating workflow. It is only slightly short of complete given the 100% schema coverage; return values and auth needs remain unaddressed.

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 real semantics the schema lacks: the omit-means-unchanged contract for all top-level params and the contrast between that contract and custom_fields' replace-everything behavior, mirrored by a pointer to the detailed parameter description.

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 ("Update a specific document") and enumerates the mutable field categories, which lets an agent distinguish this from post_document (create) and bulk_edit_documents (batch) 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 routes the agent away from this tool for additive custom-field edits ("use bulk_edit_documents with method 'modify_custom_fields' instead") and tells it to call get_document first for merge-based updates. It gives no guidance about permission prerequisites or when to prefer bulk_edit_documents for other field types, so it stops short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.