Skip to main content
Glama

post_document

Upload a document to Paperless-NGX with optional metadata (title, tags, correspondent, etc.), getting a task UUID for async tracking or the final document ID when polling is enabled.

Instructions

Upload a new document file (PDF, image, etc.) to Paperless-NGX with optional metadata. Upload is asynchronous: by default returns a task UUID (use list_tasks to track consumer progress) — the actual document ID is assigned only after the consumer has processed the file. Set poll=true to wait for the consumer to finish and return the final result (the new document_id on success, or the consumer error on failure) in a single call. Optional metadata: title, created (date), correspondent, document_type, storage_path, tags, archive_serial_number, custom_fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesBase64-encoded file content (the universal method — works for any deployment, since the bytes travel over the wire). Alternatively, an absolute file path (e.g. /tmp/invoice.pdf) that the server reads from its OWN filesystem — this only works when the server runs on the same machine as the file (local/stdio deployments). For a remote server, the path option will fail; use base64 instead.
pollNoIf true, wait for the consumer to finish and return the final task status, the new document_id (on success), or the consumer error (on failure) — instead of just the task UUID. Default false (returns immediately).
tagsNo
titleNo
createdNo
filenameYesOriginal filename including extension (e.g. 'invoice.pdf')
storage_pathNo
correspondentNo
custom_fieldsNo
document_typeNo
poll_timeout_secondsNoWhen poll=true, max seconds to wait before returning the still-in-progress status (default 30). Increase for large scans where OCR is slow.
archive_serial_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.5/5.0
Behavior5/5

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

The description exceeds what annotations convey. It discloses that upload is asynchronous, that the default returns a task UUID while the document ID is assigned only after consumer processing, and that poll=true changes the return to either document_id or error. This informs the agent about latency and failure modes.

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 description is a tight, front-loaded paragraph. Each sentence earns its place: the core action, the critical async behavior, and the optional metadata list. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description explicitly explains return values for both default and poll modes, including error behavior. Combined with the schema's detailed file and poll parametersathe description is complete enough for an agent to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%, so the description should compensate. It lists the optional metadata fields (title, created, correspondent, document_type, storage_path, tags, archive_serial_number, custom_fields), but this mostly mirrors property names without adding semantics. The detailed file (base64 vs path) and poll descriptions live in the schema, not the 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?

The description states a specific verb and resource: 'Upload a new document file ... to Paperless-NGX' with optional metadata. This clearly distinguishes from related siblings like upload_document_version (new document vs new version) and update_document (update vs create).

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?

Clear context is provided: use this to upload new documents, and the asynchronous behavior is explained with the poll=true option and the companion list_tasks tool for tracking consumer progress. It implies 'use for new uploads, not for editing existing ones' but does not explicitly exclude alternatives.

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

Deploy Server

Other Tools