Skip to content

Tools

Tools are generated from the OpenAPI spec of your Paperless, one per API operation, and named after the spec's operation IDs: documents_list, documents_retrieve, tags_create, correspondents_partial_update, and so on. Each tool's description starts with its HTTP method and path, so PATCH /api/documents/{id}/ tells you (and the model) what it does.

Toolsets

A toolset is the first path segment after /api/: everything under /api/documents/ is the documents toolset. MCP_TOOLSETS picks which ones become tools.

On by default (81 tools on Paperless-ngx with API version 10, plus create_upload below):

Toolset What it covers
documents List, filter and full-text search; read content and metadata; edit; notes; history; suggestions; bulk edit; merge, rotate and other PDF operations; upload, download, preview and thumbnail
search Global search and autocomplete
correspondents, document_types, tags, storage_paths, custom_fields Create, list, read, update and delete each
saved_views, share_links Saved views and public share links
tasks Background tasks: what is being consumed, what failed
trash List, restore and empty the trash
statistics Counts for the whole archive
bulk_edit_objects Bulk delete and permission changes for tags, correspondents and the like

Off by default: users, groups, profile, config, mail_accounts, mail_rules, processed_mail, workflows, workflow_actions, workflow_triggers, share_link_bundles, logs, status, remote_version, ui_settings.

# Only what a read-mostly assistant needs
MCP_TOOLSETS=documents,search,tags,correspondents,document_types

# The defaults plus workflows
MCP_TOOLSETS=default,workflows,workflow_actions,workflow_triggers

# The defaults plus mail accounts and mail rules, for setting up mail import
MCP_TOOLSETS=default,mail_accounts,mail_rules,processed_mail

# Everything (140 tools)
MCP_TOOLSETS=all

Setting MCP_TOOLSETS replaces the default list unless it contains default, which stands for the toolsets above: default,mail_rules is the defaults plus mail_rules. Every tool takes up room in the model's context, so more is not better: turn on what you use.

Toolsets decide which tools exist. What a tool may do is still decided by Paperless: a user without permission to delete documents gets Paperless's 403 from documents_destroy.

What is left out, in every toolset

  • Credential operations. /api/token/, /api/profile/generate_auth_token/, the two-factor endpoints and disconnect_social_account. Regenerating the API token would disconnect every client of that user, including the one making the call.
  • PUT where PATCH exists. A full update needs every field re-sent; the partial update (…_partial_update) does the same job without accidental resets.
  • bulk_download (a ZIP of binaries).
  • /api/oauth/callback/, a browser redirect target.

Files and background tasks

Tool What it does
documents_post_document_create Uploads a document: filename and content_base64, plus optional title, date, correspondent, document type, storage path, tags, serial number and custom fields.
documents_update_version Uploads a new version of a document.
create_upload Gives out a URL that takes one file (curl -T) for 15 minutes; the upload tools then take its upload_id instead of content_base64. Only for clients signed in through OAuth, not for a raw API token.
documents_download_retrieve Returns the file: the archived PDF, or the original with original=true.
documents_preview_retrieve Returns the inline preview.
documents_thumb_retrieve Returns the thumbnail as an image.

A tool answer, a file or text, is capped at 10 MB. To read a document, the model doesn't need it: documents_retrieve returns the extracted text. A file on your disk that is too big for base64 goes to the URL create_upload gives out, or to POST /upload/<tool> (multipart, the same Authorization).

Uploads and bulk operations only queue a background task and answer with its ID. The change is not there yet and can still fail: tasks_list with that task_id says when it is done, and the tools tell the model to look before it reports success.

Hints and descriptions

Every tool tells the client how it behaves, through the standard MCP tool annotations. Clients use them to decide which calls need your confirmation.

Kind of tool Read-only Destructive Idempotent
GET (…_list, …_retrieve), and the two POSTs that only read (documents_selection_data_create, storage_paths_test) yes no yes
PATCH (…_partial_update) no no yes
POST that creates (tags_create, the upload, …) no no no
DELETE (…_destroy) no yes yes
POST that deletes or rewrites files: bulk_edit, bulk_edit_objects, documents_delete, trash_create, documents_merge, documents_edit_pdf, documents_rotate, documents_remove_password no yes no

The tools that send mail or contact a mailbox (documents_email_document, email_documents, mail_account_test, mail_account_process) are marked as reaching beyond Paperless (openWorldHint).

A PATCH overwrites the fields you send, but it is marked non-destructive: it changes one object and the old values can be set again. The hints are advice for the client, not access control; what a user may do is decided by their Paperless permissions.

Descriptions start with the method and path. The tools a model uses most, and the ones where a wrong call is costly, have a description written for this server: documents_list, documents_retrieve, documents_partial_update, documents_destroy, documents_delete, bulk_edit, bulk_edit_objects, trash_list, trash_create, search_retrieve, search_autocomplete_list, statistics_retrieve, tasks_list, documents_selection_data_create and the list tools for tags, correspondents, document types, storage paths and custom fields. They say what comes back, which filters narrow the result, and how to keep it small. The other tools keep the text from the Paperless spec, with a note on paging for lists and on permanence for deletes.

The server also sends short instructions when a client connects: look IDs up first, filter on the server and leave out content with fields, read full text one document at a time, and confirm before a destructive call.

Tips for prompts

  • documents_list returns the full text of every document on the page. Ask for fields (for example id, title, created, correspondent) and a small page_size when you only need an overview.
  • Full-text search is the query parameter of documents_list; title__icontains, correspondent__id, tags__id__all, created__date__gte and the other filters narrow by metadata.
  • Metadata is referenced by ID. To tag a document, look the tag up with tags_list first, then pass its ID to documents_partial_update or bulk_edit.