Skip to main content
Glama

update_document

DestructiveIdempotent

Update a Paperless-NGX document by ID: change its title, correspondent, type, storage path, tags, or custom fields. Omitted top-level fields stay unchanged; 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.

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

Input 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.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description earns credit for explaining WHY — omitted top-level fields are preserved, but custom_fields replaces the entire set and clears anything not passed. It stops short of covering return payload or behavior on invalid IDs/references.

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 short sentences: purpose first, the merge rule second, the dangerous exception last and flagged with IMPORTANT. Nothing is padded, and the field list is compact rather than exhaustive.

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?

With 11 parameters, full schema description coverage, and annotations present, the description covers the mutation semantics an agent most needs. The only gap is that with no output schema, it never says what the call returns.

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 adds real meaning beyond the schema by stating the merge semantics of top-level parameters and by elevating the custom_fields exception to the top level rather than leaving it buried in one property.

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 gives a specific verb and resource ("Update a specific document") and enumerates the updatable fields, so an agent immediately knows this mutates one document's metadata. It does not explicitly contrast with siblings like update_document_type or bulk_edit_documents at the top level, but the resource is unambiguous.

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 the key partial-update rule ("Top-level fields you omit are left unchanged") and routes the agent to alternatives for the custom-field case (get_document to merge, bulk_edit_documents with 'modify_custom_fields' to add additively). What's missing is guidance on when to prefer bulk_edit_documents for multi-document or multi-field edits.

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