Skip to main content
Glama

Agentic Endpoints

Extract text from a PDF

pdf_parse
Read-onlyIdempotent

Extract text from a PDF by URL. Handles compressed streams, PDF 1.5+ object streams and ToUnicode CMaps, and reports encrypted or image-only documents honestly instead of returning garbage. Costs $0.020 in USDC on Base, paid via the x402 protocol, or from a credit token — call credits_trial for free credit if you have neither.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesHTTPS URL of the PDF
max_pagesNoOptional page cap
credit_tokenNoOptional. A credit token from credits_trial or /credits/buy. Supplying it pays for this call from that balance, so no x402 payment or wallet is needed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe PDF that was fetched
pagesYes
page_countYesPages extracted
extracted_atNoISO-8601 extraction time

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and open-world. The description adds valuable behavioral disclosures beyond that: how it handles compressed streams, PDF 1.5+ object streams, ToUnicode CMaps, and that it returns honest diagnostics for encrypted or image-only PDFs instead of garbage. It also surfaces the cost and payment flow, which materially affects invocation.

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 sentences with no filler. The first sentence states the core action; the second packs meaningful capability, failure behavior, and payment details. Every sentence earns its place and the most important information is front-loaded.

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 read-only extraction tool with a full output schema, the description covers what the tool does, what PDF complexities it handles, how it behaves on problematic inputs, and how to pay. The only implicit requirement, that the URL be HTTPS, is already specified in the schema. Nothing needed for correct invocation is missing.

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 description coverage is 100%, so the schema already documents all three parameters. The description adds a little color around the credit_token payment flow and 'by URL' framing, but it does not significantly extend parameter meaning beyond what the schema provides. 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 description opens with a specific verb and resource: 'Extract text from a PDF by URL.' It clearly identifies the tool's core function and distinguishes it from sibling tools like scrape or meetings_* by being PDF-specific and text-extraction-focused.

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 makes clear when the tool applies (PDFs by URL) and provides practical context about payment methods and the credits_trial alternative. It does not explicitly name excluded cases or alternative tools, but the purpose is specific enough that the usage context is evident.

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