Skip to main content
Glama
Milli42

paperlessngx-mcp

by Milli42

paperless_extract_field

Extract a specific field from a document using a built-in extractor or custom regex. The OCR text is parsed locally, returning only the extracted value for privacy.

Instructions

PRIVACY TIER 2 (local extraction): Extract ONLY a specific field from a document. The OCR text is fetched into the MCP server process, parsed LOCALLY, and only the extracted value(s) are returned — the full content never enters the model context. extraction_pattern may be a named built-in extractor (dollar_amounts, dates, emails, phone_numbers, addresses, total_amount) or a custom JavaScript-style regular expression. This is the extensibility point where a future local LLM extraction backend would plug in.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesPaperless document ID.
extraction_patternYesNamed built-in extractor (dollar_amounts, dates, emails, phone_numbers, addresses, total_amount) OR a raw regex. If a raw regex, all matches (capture group 1 if present) are returned.
regex_flagsNoOptional flags for a raw-regex pattern (default 'gi').
Behavior4/5

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

No annotations beyond title, so description carries full burden. Discloses that OCR text is fetched into MCP server, parsed locally, only extracted values returned, and full content never enters model context. Also explains extraction_pattern behavior. Does not cover error scenarios or performance, but privacy aspect is well-covered.

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?

Single focused paragraph, front-loads privacy tier and purpose. Every sentence adds value; no fluff. Could benefit from slight structuring (e.g., separating usage notes) but overall efficient.

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?

Given no output schema, description adequately explains return values (extracted value(s) or matches for regex). Covers privacy, examples of extraction patterns, and extensibility. Missing details on error handling or performance, but sufficient for a focused extraction tool.

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 100%, but description adds significant value: explains that extraction_pattern can be built-in named extractors (listing examples) or custom regex, and that regex returns all matches with capture group 1 if present. This goes beyond schema descriptions.

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?

Description states specific verb ('extract') and resource ('specific field from a document'), distinguishes from siblings like paperless_get_document_content by emphasizing local extraction and privacy tier.

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?

Clearly indicates when to use: for extracting specific fields from a document, with privacy restrictions. Implicitly excludes full-document retrieval (siblings handle that). Lacks explicit when-not-to-use but context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Milli42/paperlessngx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server