Skip to main content
Glama

pdf_text

Extract text from a PDF, per page. Pass as_markdown=true for a clean Markdown version with '## Page N' headings.

Input Schema

NameRequiredDescriptionDefault
fileYesPDF file content as base64
as_markdownNoreturn Markdown instead of JSON (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral weight; it does disclose output shape (per-page results, '## Page N' headings in Markdown mode), which is useful. It says nothing about scanned/image-only PDFs, OCR, encrypted files, failure modes, or input-size limits for base64 payloads.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, zero filler, with the core action front-loaded and the option modifier second. Nothing is repeated from the schema verbatim beyond what is needed to explain the effect.

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?

For a 2-parameter extraction tool with no output schema or annotations, the description covers what it does and the output format switch, but omits the practical caveats an agent needs — scanned PDFs without a text layer, password-protected files, and expected error behavior.

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 is 100%, so baseline is 3, but the description genuinely adds meaning beyond the schema: it spells out that Markdown mode yields a 'clean' version with '## Page N' headings, telling the agent what the flag actually produces. It still doesn't clarify the base64 input format beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Extract text from a PDF") plus the output granularity ("per page"), so an agent knows exactly what it returns. Sibling tools (pdf_info, pdf_merge, pdf_split) are clearly different operations, though the description never names them for explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives one conditional usage hint — set as_markdown=true when a Markdown form is wanted — which implies the default path. It offers no guidance on when to reach for this versus pdf_info (metadata) or pdf_safe_scan, leaving sibling selection to inference from names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.