Search documents
search_documentsFind 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
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, from 1. | |
| inbox | No | true: only inbox documents; false: none of them. | |
| owner | No | Username or id of the owning user. | |
| query | No | Full-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_to | No | Date (YYYY-MM-DD), inclusive. | |
| has_tags | No | true: documents with any tag; false: untagged documents. | |
| ordering | No | Sort field, '-' for descending; default newest first or relevance. | |
| tags_all | No | Tag names or ids; documents have all of them. | |
| tags_any | No | Tag names or ids; documents have at least one. | |
| page_size | No | Documents per page, at most 100. | |
| tags_none | No | Tag names or ids; documents have none of them. | |
| added_from | No | Date (YYYY-MM-DD), inclusive. | |
| created_to | No | Date (YYYY-MM-DD), inclusive. | |
| created_from | No | Date (YYYY-MM-DD), inclusive. | |
| more_like_id | No | Find 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_path | No | Name or id; see list_taxonomy. | |
| correspondent | No | Name or id; see list_taxonomy. | |
| document_type | No | Name or id; see list_taxonomy. | |
| title_contains | No | Only titles containing this text, ignoring case. | |
| has_storage_path | No | true: documents with a storage path; false: without one. | |
| has_correspondent | No | true: documents with a correspondent; false: without one. | |
| has_document_type | No | true: documents with a document type; false: without one. | |
| custom_field_query | No | Paperless 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
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| count | Yes | How many documents match in total. | |
| notices | No | Query syntax the search index reads as plain text, with the working alternative; empty for a clean query. Paperless itself reports no error for these. | |
| documents | Yes | ||
| next_page | Yes | The next page, null on the last one. |