Skip to main content
Glama

Extract PDF text by page

pdf_extract

Extract text from a digital PDF into page-numbered JSON with SHA-256 hashes. No account or API key. 0.005 USDC on Base per successful document via x402. Maximum 2 MiB and 25 pages. No OCR, summaries, URL fetching, or verification of document claims.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_base64YesStandard padded base64 of PDF bytes, maximum 2097152 bytes. No URL or data-URI prefix.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes
warningsYes
page_countYes
provenanceYes
schema_versionYes
character_countYes
document_sha256Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Adds substantial behavioral context beyond the annotations: no account or API key required, a per-document charge of 0.005 USDC on Base via x402, and hard input limits. The pricing and limits aren't derivable from the annotation flags. It does not explain the readOnlyHint=false flag (presumably the on-chain payment), leaving one small gap in an otherwise well-disclosed profile.

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?

Four tight sentences, front-loaded with what the tool produces; each remaining sentence carries a distinct constraint (auth, price, limits, exclusions). No filler.

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?

An output schema exists, so the description only needs to state the output kind, which it does. Auth, cost, size limits, and excluded capabilities are all covered for a single-parameter 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 is 100% for the single pdf_base64 parameter, so the baseline would be 3. The description adds the 25-page ceiling, which is not expressed anywhere in the schema and meaningfully constrains what inputs are valid.

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 ('Extract text from a digital PDF') plus the exact output shape ('page-numbered JSON with SHA-256 hashes'). No siblings exist, but the scope qualification 'digital' already signals what class of input it handles.

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

Usage Guidelines5/5

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

Explicitly carves out when this tool does NOT apply: 'No OCR, summaries, URL fetching, or verification of document claims', plus hard limits (2 MiB, 25 pages). An agent can decide against this tool for scanned PDFs or oversized documents without any further inference.

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.

Resources