Skip to main content
Glama

docs

Parse Document

parse_document
Idempotent

Parse a PDF to structured Markdown (hallucination-guarded OCR for scanned pages, Japanese-strong). Pass url (one step: the 402 quotes the exact price for that PDF) or quote_id from quote_parse (price fixed by the quote). One of the two is required. Choose this when the input is a PDF and you want its full text as Markdown; call pdf_info first if you do not know whether it is scanned, and use document_pipeline instead for invoices you also want verified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoAbsolute http(s) URL of the PDF (one-step form)
quote_idNoquote_id returned by quote_parse (price is fixed by the quote)
x_paymentNoOptional: base64 X-PAYMENT header value (x402 exact scheme, USDC on Base mainnet). Omit it to receive the payment requirements (accepts[] + docs) for this call without being charged.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesJSON body of the underlying call (see /samples/{product} for each product's shape)
statusYesHTTP status of the underlying call (200 result, 402 payment terms, 4xx input error)
how_to_payNo
receipt_idNoset on paid results; free re-fetch via get_receipt
payment_requiredNotrue when status is 402: body holds x402 payment terms, not a result. Pay and call again with x_payment

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false, but the description adds the substantive behavioral detail those annotations omit: the 402 response quotes an exact price, omitting x_payment returns payment requirements without being charged, and quote_id locks the price. This is real value beyond structured fields, though limits such as document size or failure handling are unstated.

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?

Three dense sentences, all load-bearing, with the core capability front-loaded before routing and payment mechanics. The stacked parentheticals in sentence one are slightly packed, but nothing is padding or repetition of the name/title.

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 return-format explanation is unnecessary. For a 3-parameter paid tool with no required fields, the description covers capability, output form, parameter choice, prerequisites (pdf_info), alternatives (document_pipeline), and the payment lifecycle an agent must navigate to invoke it successfully.

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 description coverage is 100%, so baseline is 3. The description goes further by explaining the semantic relationship declared only structurally in x-required-one-of: 'One of the two is required', plus the tradeoff that url is the one-step form while quote_id carries a pre-fixed price. That interpretation is not derivable from the schema alone.

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?

Names a specific verb and resource with the exact output form: 'Parse a PDF to structured Markdown'. The parentheticals add distinguishing traits (hallucination-guarded OCR, Japanese-strong) that separate it from the many other PDF siblings. An agent can identify this tool without opening the schema.

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?

Explicit routing: choose this when the input is a PDF and full text as Markdown is wanted; call pdf_info first if scanning status is unknown; use document_pipeline for invoices needing verification. It also states how to choose between url and quote_id (one-step vs. fixed price). Both when-to-use and alternatives are covered.

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