Skip to main content
Glama

post_document

Upload a new document to Paperless-NGX with optional metadata such as title, correspondent, type, tags, and custom fields. Provide 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).

Input Schema

TableJSON 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

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does add real context: the server-side filesystem read implied by file_path, the filename derivation default, and the PAPERLESS_MCP_UPLOAD_PATHS security restriction. It omits failure behavior and whether processing is synchronous, which keeps it short of a 5.

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 purpose before the file/file_path mechanics and security note. The uppercase SECURITY sentence is slightly heavy but the content earns its place.

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

Completeness3/5

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

For a mutation tool with no annotations or output schema and 11 partially documented parameters, the description covers the upload mechanics well but leaves several parameters and the response/processing outcome unexplained. Adequate but with clear gaps.

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 27% across 11 parameters. The description names the major fields (title, correspondent, document type, tags, custom fields) and explains the file/file_path/filename relationship, but says nothing about created, storage_path, or archive_serial_number, leaving those opaque.

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 opens with a specific verb and resource ('Upload a new document to Paperless-NGX') and enumerates the optional metadata it accepts. This clearly separates it from sibling operations like update_document, create_document_note, or download_document.

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 clear usage conditions: supply either 'file' (base64) or 'file_path' (server path), and prefer file_path to avoid base64 overhead for large files. It does not name alternative tools, but for a create/upload operation there is no close sibling to route against.

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