Skip to main content
Glama

AgentTools Hub

PDF to Text

dev_pdf_to_text

Fetch a PDF (by URL, SSRF-guarded) or accept it as base64 and extract all readable text with page count. Deterministic parsing — no language model, so nothing is invented. Text-based PDFs only; scanned images need OCR (not included). — x402 price $0.003/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesOr provide base64 instead
base64YesBase64 content
maxCharsYesMax text length

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does so well: SSRF-guarding on the fetch path, deterministic parsing with no LLM hallucination risk, and the text-only limitation. It omits failure modes/error behavior and any statement about what happens when maxChars truncates, which keeps it below 5.

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?

Three compact clauses, front-loaded with the core action, then limitations, then cost. Nothing is padding; the pricing boundary is separated with a dash and does not dilute the operational content.

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?

No output schema exists, and the description partly compensates by naming the return (text plus page count). Inputs, pricing, safety, and scope limitations are all covered. A brief note on truncation via maxChars or on error responses would make it fully self-sufficient.

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 adds value the schema actively muddles: the schema marks url AND base64 both required while the url field says 'Or provide base64 instead'. The description's 'by URL ... or accept it as base64' clarifies this is an either/or input, which is genuine semantic clarification beyond the schema.

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 (extract) on a specific resource (PDF text), plus both supported input modes (URL or base64) and the returned artifact (readable text + page count). The PDF focus distinguishes it cleanly from siblings like dev_text_extract and dev_url_reader.

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?

Gives a clear exclusion: text-based PDFs only, scanned images need OCR and that is not included. That is real when-not-to-use guidance. It stops short of naming an alternative tool to route to, so it does not reach 5.

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