Skip to main content
Glama

list_documents

Read-only

List and filter Paperless-NGX documents by title, correspondent, tag, document type, storage path, or date. Use field IDs for accurate searches instead of free-text.

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 look up the correct ID — get_filing_options returns every tag, correspondent, document type and storage path in one call (or use list_tags / list_correspondents / list_document_types / list_storage_paths) — 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
idsNoOnly these document IDs — read several known documents in one call
tagNo
pageNoPage number (1-based)
fieldsNoReturn only these fields to keep the response small, e.g. ["title", "tags"]. id is always included.
searchNoCase-insensitive substring match on title, correspondent name and content, read straight from the database (always current, unranked); every word must appear. For ranked full-text search with query syntax use search_documents.
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. Changed3 schema fields changedv3.2.1
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Return only these fields to keep the response small, e.g. [\"title\", \"tags\"]. id is always included.",
      +  "items": {
      +    "enum": [
      +      "id",
      +      "title",
      +      "correspondent",
      +      "document_type",
      +      "storage_path",
      +      "tags",
      +      "created",
      +      "created_date",
      +      "modified",
      +      "added",
      +      "deleted_at",
      +      "archive_serial_number",
      +      "original_file_name",
      +      "archived_file_name",
      +      "duplicate_documents",
      +      "owner",
      +      "permissions",
      +      "user_can_change",
      +      "is_shared_by_requester",
      +      "custom_fields",
      +      "page_count",
      +      "mime_type",
      +      "root_document",
      +      "versions"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / ids
      Added value: +{
      +  "description": "Only these document IDs — read several known documents in one call",
      +  "items": {
      +    "type": "number"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / search / description
      Added value: +"Case-insensitive substring match on title, correspondent name and content, read straight from the database (always current, unranked); every word must appear. For ranked full-text search with query syntax use search_documents."
  2. First observedv3.2.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the read-only safety profile, so the bar is lower, but the description still adds real behavior: document content is excluded by default (pointing at get_document_content), and the search argument is characterized as an unranked, always-current DB substring match versus search_documents' ranked full-text. It does not discuss pagination defaults or result ordering, which is the remaining gap.

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-loads the core purpose, then the ID-lookup workflow, then the two caveats (content exclusion, duplicate options) — each sentence earns its place. It is on the longer side for a list tool, but there is no filler or restatement of the title.

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 15-parameter list tool with no output schema, the description covers the filtering workflow, the default-field behavior, and the sibling routing an agent needs. The main omission is guidance on pagination/ordering behavior across pages, but that is partially covered by the schema's page and page_size descriptions.

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 only 53%, so description must compensate, and it does for the important cases: it explains that tag/correspondent/document_type/storage_path take an ID that should be resolved first, that ids reads several known documents, that more_like_id finds similar docs, and that has_duplicates partitions flagged duplicates. The bare numeric filter params still rely on the keywords being self-explanatory, but the high-value semantics are added.

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?

Opens with a specific verb+resource ('List and filter documents') and immediately scopes the filterable fields. It actively distinguishes itself from several siblings by name — search_documents (for ranked full-text), more_like_id (near-duplicates), has_duplicates, and get_document_content — so an agent can route correctly without opening other 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?

Gives an explicit workflow: for tag/correspondent/document-type/storage-path queries, FIRST look up the ID via get_filing_options or the dedicated list_* tools, then filter here. It also states the exclusion ('Only use the search argument for free-text search when no specific field applies') and routes duplicates/near-duplicate queries to the right options. This is when-to-use and when-not-to-use, with named alternatives.

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