Skip to main content
Glama
Nizoka

pdfnative-mcp

Extract plain text from PDF

extract_text
Read-onlyIdempotent

Extract plain text from non-encrypted PDFs by processing each page's content stream. Indicates whether extraction succeeded and why if it failed.

Instructions

Best-effort plain-text extraction from a non-encrypted PDF. Walks each page's content stream and pulls the operands of Tj/'/"/TJ text operators. The result.extractable boolean is FALSE when one or more pages have non-empty content but yielded no text (this is EXPECTED for PDFs using subset fonts without /ToUnicode CMaps — it is not an error). The accompanying extractableReason field explains why. Encrypted PDFs are rejected with EXTRACTION_UNSUPPORTED. Tagged-mode structure-tree extraction (cleaner output for tagged PDFs) is tracked on the roadmap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNoOptional 0-based page indices to extract. When omitted, every page is extracted.
fieldsNoOptional dot-path projection applied to the structured result (e.g. ['fullText'] or ['extractable']). Composes after verbosity. Unknown paths are omitted.
pdfBase64YesBase64-encoded PDF bytes.
verbosityNoResponse verbosity. 'full' (default) returns the per-page pages[] array and fullText; 'summary' returns a token-frugal { pageCount, extractedPageCount, extractable, charCount } and drops the text payloads.full

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes
fullTextYes
pageCountYes
extractableYesFalse when one or more requested pages had a non-empty content stream but yielded no extractable text (likely subset fonts without /ToUnicode).
extractableReasonNoHuman-readable explanation when extractable=false. Absent when extractable=true.
extractedPageCountYes
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint), the description reveals critical behaviors: best-effort extraction, content stream walking, extractable flag semantics for subset fonts, encrypted PDF rejection with EXTRACTION_UNSUPPORTED, and a roadmap for tagged-mode extraction. No contradictions with annotations.

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 a single dense paragraph with no fluff, front-loaded with the main purpose. Could benefit from bullet points for the nuanced behaviors, but it remains concise and informative.

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 the tool's complexity (4 params, output schema exists), the description covers most edge cases (encrypted PDFs, subset fonts, extractable boolean). It doesn't detail output schema but that is provided elsewhere. Missing performance considerations but overall adequate.

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

Parameters3/5

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

Schema coverage is 100% and each parameter is well-described in the schema. The description adds minimal additional meaning beyond 'best-effort' context. Baseline 3 is appropriate as schema already handles param semantics.

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 clearly states 'Best-effort plain-text extraction from a non-encrypted PDF', specifying the action (extract) and resource (text from PDF). It distinguishes from sibling tools like extract_attachments by focusing on text content rather than embedded files.

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?

The description provides context on usage: it explains the extractable boolean behavior for subset fonts and rejection of encrypted PDFs. While it doesn't explicitly compare to alternatives, the context helps the agent decide when to use this tool over others.

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/Nizoka/pdfnative-mcp'

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