Skip to main content
Glama

list_documents

Read-only

Filter and retrieve Paperless documents by metadata, custom fields, and IDs, including duplicate detection and similar-document lookup.

Instructions

List and filter documents by fields such as title, correspondent, document type, tag, storage path, creation date, and more. IMPORTANT: For queries like 'the last 3 contributions' or when searching by tag, correspondent, document type, or storage path, you should FIRST use the relevant tool (e.g., 'list_tags', 'list_correspondents', 'list_document_types', 'list_storage_paths') to find the correct ID, and then use that ID as a filter here. Only use the 'search' argument for free-text search when no specific field applies. Using the correct ID filter will yield much more accurate results. Note: Document content is excluded from results by default. Use 'get_document_content' to retrieve content when needed. To find near-duplicates of one document use more_like_id; to list everything Paperless has flagged as a duplicate use has_duplicates=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
pageNoPage number (1-based)
searchNo
orderingNo
page_sizeNoNumber of items per page
more_like_idNoFind documents similar to the document with this ID
storage_pathNo
correspondentNo
document_typeNo
has_duplicatesNotrue = only documents Paperless flagged as possible duplicates (the same file as another document); false = only documents without. get_document lists the matching documents in duplicate_documents (list results leave that field empty).
created__date__gteNo
created__date__lteNo
custom_field_queryNoCustom-field filter as a JSON expression passed as a string. A condition is [field, operator, value], where field is the custom field's name or ID. Combine conditions with ["AND", [cond, …]] or ["OR", [cond, …]], and negate with ["NOT", cond]. Valid operators depend on the field's data type (e.g. exact, in, isnull, exists, icontains, gt, gte, lt, lte, range); pick an invalid one and Paperless names the valid ones. Examples: '["Amount", "gte", 100]', '["AND", [["Due", "lt", "2026-10-01"], ["Paid", "exact", false]]]'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.5/5.0
Behavior4/5

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

The readOnlyHint annotation already signals safety, and the description adds meaningful behavioral context beyond that: document content is excluded by default, ID filters produce more accurate results than free text, and duplicate/similarity behavior is outlined. This exceeds what annotations alone provide, though it does not cover response shape or pagination behavior.

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?

The description is longer than average but every sentence carries routing or behavioral information, and the high-priority ID-resolution guidance is clearly flagged with 'IMPORTANT'. It is somewhat dense, but the length is justified by 13 parameters and many sibling alternatives.

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 a read-only list tool with no output schema, the description covers the major agent decision points: which filters need pre-resolved IDs, when to use free-text search, content exclusion, and duplicate/similarity options. It leaves ordering and exact date-filter formats to the schema, but those are secondary to correct tool selection and invocation.

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?

With only 38% schema description coverage, the description compensates by explaining the semantic role of key parameters: tag/correspondent/document_type/storage_path should be IDs from listing tools, 'search' is only a free-text fallback, and has_duplicates/more_like_id address duplicates. It doesn't detail ordering or date formats, but it resolves the most important parameter ambiguities.

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 'List and filter documents by fields...' naming a specific action, resource, and filter dimensions. It distinguishes itself from search_documents by restricting the 'search' argument to free-text when no specific field applies, and from content retrieval tools by noting document content is excluded. An agent can tell this apart from siblings like get_document or search_documents without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs the agent to first call list_tags, list_correspondents, list_document_types, or list_storage_paths to resolve IDs before filtering. It also states when 'search' is appropriate, when to use get_document_content, and how to handle duplicates via more_like_id or has_duplicates. This is explicit when-to-use and alternative-routing guidance.

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