Skip to main content
Glama

PDF to markdown

get_pdf_markdown
Read-onlyIdempotent

Use when an agent needs the text of a PDF as markdown. Returns the text of the one PDF URL you pass, page by page as markdown, with title, page count and word count. http or https, 10 MB, 10 s; robots.txt honoured and private addresses refused. A file that is not a PDF, a PDF with no text layer (a scan), or an unreachable URL, is never charged. Costs 0.01 USDC per call (x402, USDC on Solana, Base, Polygon, Arbitrum or Arc).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesthe PDF to convert: an absolute http or https URL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesthe get_pdf_markdown payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_pdf_markdown
toolYesthe tool that produced this payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by stating hard operational limits (http/https, 10 MB, 10 s), the robots.txt and private-address policy, the failure modes that are not charged, and the exact cost and payment rails. For an openWorld, paid network call this is exactly the context an agent needs.

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?

Front-loaded with the use case, then constraints, then pricing, so the most decision-relevant content comes first. It is dense but every clause carries distinct information (limits, policy, cost), with only minor overlap between 'http or https' and the schema.

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?

With an output schema present the return shape needn't be spelled out, yet the description still summarizes it (title, page count, word count). Combined with annotations covering safety and the description covering limits, policy, failure handling and payment, nothing required to invoke it correctly 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% and there is a single parameter whose format is already documented as an absolute http/https URL. The description's 'the one PDF URL you pass' essentially restates the schema, adding no syntax beyond it, so the baseline of 3 applies.

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 action and resource ('the text of a PDF as markdown') so the agent immediately knows the input type and output format. It implicitly distinguishes itself from web-markdown siblings by being PDF-specific, but never names an alternative tool for contrast.

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?

Opens with an explicit when-to-use trigger ('Use when an agent needs the text of a PDF as markdown') and identifies the failure case of a scanned PDF with no text layer. It does not, however, route that case explicitly to a sibling such as get_ocr.

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.