Skip to main content
Glama

post_document

Upload a new document to Paperless-NGX with optional title, correspondent, document type, tags, and custom fields using base64 content or a server file path.

Instructions

Upload a new document to Paperless-NGX with optional metadata like title, correspondent, document type, tags, and custom fields. Provide either 'file' (base64-encoded content) or 'file_path' (absolute path to a file on the server's filesystem). Using file_path avoids base64 encoding overhead for large files. SECURITY: When using file_path, set PAPERLESS_MCP_UPLOAD_PATHS environment variable to restrict uploads to specific directories (colon-separated paths).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "post_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoBase64-encoded file content. Either 'file' or 'file_path' must be provided.
tagsNo
titleNo
createdNo
filenameNoFilename for the uploaded document. Required when using 'file', optional when using 'file_path' (defaults to the basename of the path).
file_pathNoAbsolute path to a file on the server's filesystem. Either 'file' or 'file_path' must be provided. The filename is derived from the path unless 'filename' is also specified. For security, configure PAPERLESS_MCP_UPLOAD_PATHS to restrict allowed directories.
storage_pathNo
correspondentNo
custom_fieldsNo
document_typeNo
archive_serial_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.2.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / archive_serial_number / type
      Previous value: -"string"New value: +"number"
    • addedInput schema / properties / file / description
      Added value: +"Base64-encoded file content. Either 'file' or 'file_path' must be provided."
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to a file on the server's filesystem. Either 'file' or 'file_path' must be provided. The filename is derived from the path unless 'filename' is also specified. For security, configure PAPERLESS_MCP_UPLOAD_PATHS to restrict allowed directories.",
      +  "type": "string"
      +}
    • addedInput schema / properties / filename / description
      Added value: +"Filename for the uploaded document. Required when using 'file', optional when using 'file_path' (defaults to the basename of the path)."
    • removedInput schema / required
      Removed value: -[
      -  "file",
      -  "filename"
      -]
  2. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false and idempotentHint=false, so the mutation and safety profile is covered structurally. The description adds genuine value with the server-side path security model (PAPERLESS_MCP_UPLOAD_PATHS, colon-separated directories) and the base64-vs-path tradeoff. It stays silent on what happens after upload (synchronous vs task-based processing, duplicate handling, returned identifiers), which matters for a non-idempotent write with no output schema.

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 sentences, front-loaded with the purpose, then the input-mode choice, then the security constraint — a sensible order with little waste. The file/file_path alternatives are restated slightly when the schema already carries the same sentence, but that repetition is defensible for the tool's key decision.

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 tool with zero required fields and no output schema, the description usefully closes the biggest gap — the implicit 'at least one of file or file_path' requirement — and flags the security configuration. It is not fully complete: the meaning of the numeric reference parameters and the post-upload outcome remain undocumented.

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 description coverage is only 27% across 11 parameters, so the description needs to carry weight. It does explain the file/file_path mutual requirement and the filename derivation rule, but it leaves the numeric parameters (correspondent, document_type, storage_path, tags, custom_fields, archive_serial_number) as unexplained IDs, and 'created' is never mentioned.

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 ('Upload a new document to Paperless-NGX') and enumerates the metadata it accepts (title, correspondent, document type, tags, custom fields), which is far clearer than the bare tool name. It does not explicitly contrast itself with siblings such as update_document or download_document, so the distinction is implied rather than stated.

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 real usage guidance for the tool's main fork: 'Provide either file ... or file_path', plus the reason file_path is preferable ('avoids base64 encoding overhead for large files'). What is missing is guidance on when to use a different tool (e.g., update_document for an existing doc) or prerequisites such as the referenced IDs needing to already exist.

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