Skip to main content
Glama
sagelabs-dev

Paperless-NGX MCP Server

by sagelabs-dev

search_passages

Search documents full-text and return bounded text passages around each hit, so you can locate and skim evidence across many documents without flooding context.

Instructions

Search documents full-text and return bounded text passages around each hit instead of whole documents. Locates the query terms in each matching document's stored content, cuts a window (default 800 chars) around the first occurrence, and returns it with the document id, title, score, offset, content_length, and the server's own highlighted snippet. Use this to locate and skim evidence across many documents without flooding context; page further with get_document_content offsets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
queryYesFull-text query (same syntax as query_documents).
windowNoCharacters per passage (default 800).
orderingNo
page_sizeNo
max_passagesNoMaximum passages to return (default 5).
storage_pathNo
correspondentNo
document_typeNo
paperless_filtersNo
created__date__gteNo
created__date__lteNo
custom_fields__icontainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does substantial work: it discloses windowing behavior (cuts a window around the first occurrence, default 800 chars) and enumerates the return payload (document id, title, score, offset, content_length, server snippet). It omits permissions/auth requirements and any result-count or rate-limit 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?

Two sentences, no filler, and the core differentiation is front-loaded in the opening clause. The middle enumeration of returned fields is slightly list-heavy but justified given the absence of an output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description compensates well for the missing output schema by describing the return fields, but for a 13-parameter tool at 23% schema coverage the filter and paging parameters remain undocumented in both places. An agent can call it with a query, but cannot confidently use the filtering surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 23% across 13 parameters, so the description must compensate and largely does not. It explains the 'window' default but says nothing about max_passages (default 5), ordering, page_size, tag, correspondent, document_type, storage_path, paperless_filters, or the date/custom-field filters.

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 and resource ('Search documents full-text') plus the distinguishing behavior ('return bounded text passages around each hit instead of whole documents'), which separates it from search_documents, query_documents, and get_document_content without opening any schema.

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?

Explicitly says to 'use this to locate and skim evidence across many documents without flooding context' and routes continuation to 'get_document_content offsets' — a clear when-to-use plus a named follow-up tool. It stops short of stating when NOT to use it (e.g. when the full document is needed) or how it relates to search_documents/query_documents.

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