Skip to main content
Glama
Nizoka

pdfnative-mcp

Extract plain text from PDF

extract_text
Read-onlyIdempotent

Extracts plain text from non-encrypted PDFs by parsing page content operators. Returns a boolean indicating whether text was extractable with a reason if not.

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
pdfBase64YesBase64-encoded PDF bytes.
pagesNoOptional 0-based page indices to extract. When omitted, every page is extracted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageCountYes
extractedPageCountYes
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.
pagesYes
fullTextYes
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false. The description adds significant behavioral details: it walks content streams, extracts specific operators, explains extractable field, and notes encrypted PDFs are rejected. This provides complete transparency beyond 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 concise (four sentences) and front-loaded with purpose. It efficiently covers mechanism, limitations, and error handling. Could be slightly more structured but is effective.

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

Completeness5/5

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

For a complex extraction tool with full schema coverage and annotations, the description covers extraction method, edge cases (subset fonts), error conditions (encrypted PDFs), and future roadmap. No gaps.

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% with both parameters described. The description does not add substantial meaning beyond the schema; it mentions page omission behavior which is already in schema. Baseline 3 is appropriate.

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 title 'Extract plain text from PDF' and description explicitly state the tool extracts text from PDFs. It clearly distinguishes from sibling tools (e.g., add_attachment, validate_pdf) which perform different operations.

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 specifies it works on non-encrypted PDFs and explains expected behavior for PDFs with subset fonts. It doesn't explicitly state when to use this tool versus alternatives, but siblings are all unrelated operations, so usage 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/Nizoka/pdfnative-mcp'

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