Skip to main content
Glama
mcp-server-paperless

mcp-server-paperless

Search documents

search_documents
Read-onlyIdempotent

Find Paperless documents by full-text query, similarity, or combined structured filters such as tags, correspondent, dates, and custom fields, returning IDs, names, dates, and web URLs.

Instructions

Find documents by full text, similarity or structured filters; all filters combine.

Names (correspondent, document type, storage path, tags, owner) match exactly or ignoring case and accents; an unknown or ambiguous name is an error that lists candidates. Rows hold ids, names, dates, custom field values and web_url, never the document text. count is the total; pass next_page as page to see more. To find documents without a correspondent, document type, storage path or tags use has_correspondent, has_document_type, has_storage_path or has_tags set to false.

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": "search_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, from 1.
inboxNotrue: only inbox documents; false: none of them.
ownerNoUsername or id of the owning user.
queryNoFull-text query in Paperless syntax over title, content, correspondent, type and tags; notes and custom fields by prefix, e.g. 'invoice AND acme', 'created:[2024 to 2025]', 'notes.note:paid'. NOT, AND and OR must be uppercase (lowercase are plain search terms); a leading minus or ! does not exclude, write NOT term; 'type:*' is presence; an unknown field is searched as plain text. Misread syntax is named in notices. Results are ranked by relevance and carry highlights.
added_toNoDate (YYYY-MM-DD), inclusive.
has_tagsNotrue: documents with any tag; false: untagged documents.
orderingNoSort field, '-' for descending; default newest first or relevance.
tags_allNoTag names or ids; documents have all of them.
tags_anyNoTag names or ids; documents have at least one.
page_sizeNoDocuments per page, at most 100.
tags_noneNoTag names or ids; documents have none of them.
added_fromNoDate (YYYY-MM-DD), inclusive.
created_toNoDate (YYYY-MM-DD), inclusive.
created_fromNoDate (YYYY-MM-DD), inclusive.
more_like_idNoFind documents similar to this document id. On Paperless 3.4.2 an empty result can be a search-index fault; the admin fixes it with `document_index reindex`.
storage_pathNoName or id; see list_taxonomy.
correspondentNoName or id; see list_taxonomy.
document_typeNoName or id; see list_taxonomy.
title_containsNoOnly titles containing this text, ignoring case.
has_storage_pathNotrue: documents with a storage path; false: without one.
has_correspondentNotrue: documents with a correspondent; false: without one.
has_document_typeNotrue: documents with a document type; false: without one.
custom_field_queryNoPaperless custom field query: [field, op, value], fields by name, combined with ['AND'|'OR', [...]] or ['NOT', [...]]. Ops: exact, in, isnull, exists, icontains, gt, gte, lt, lte, range, contains. Dates take relative values: ['due', 'range', ['today', 'in 30 days']].

Output Schema

NameRequiredDescriptionDefault
pageYes
countYesHow many documents match in total.
noticesNoQuery syntax the search index reads as plain text, with the working alternative; empty for a clean query. Paperless itself reports no error for these.
documentsYes
next_pageYesThe next page, null on the last one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly/idempotent annotations: name filters match exactly or case/accent-insensitively, an unknown or ambiguous name is an error that lists candidates, all filters combine, count is the total, and rows contain ids/names/dates/custom field values/web_url. Those are the failure modes and payload shape an agent needs before calling.

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?

Front-loaded with the purpose, followed by matching semantics, return shape and pagination in a compact flow with no filler sentences. The parenthetical enumerations of filter names are slightly dense but each carries information.

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?

For a 23-parameter search tool with full schema coverage, annotations and an output schema, the description covers the cross-cutting semantics the schema cannot express: filter combination, name-matching strictness, error behavior and how to page. Nothing needed to call it correctly appears missing.

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, but the description still adds meaning: the AND-combination semantics of all filters and the exactness/ambiguity behavior of name-or-id parameters like correspondent and document_type. The remaining parameter detail (tag operators, custom_field_query ops, ordering) is left to the schema.

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?

States a specific verb (find) plus the three search modes (full text, similarity, structured filters) and clarifies that rows never carry document text, which implicitly routes the agent to get_document_content. It is clearly distinguishable from get_document, list_taxonomy and the other siblings.

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?

Gives concrete guidance for the negative-presence case ('to find documents without a correspondent... use has_correspondent... false') and covers pagination ('pass next_page as page to see more'). It stops short of naming a sibling alternative such as get_document_content for reading text, so the when-to-use-vs-alternative guidance is implicit rather than explicit.

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