Skip to main content
Glama

parse_generic_document

Parse any PDF to extract text and tables, returning structured JSON for flexible data processing.

Instructions

Extract text and tables from any PDF document.

Less structured than specialized parsers, but more flexible.
Returns full text content and detected tables.

Args:
    file_url: Public URL of the PDF file (max 20MB).
    language: Document language(s) for OCR. Default: ita+eng.
    extract_tables: Detect and extract tables. Default: true.

Cost: $0.01 per document, paid via x402 USDC on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlYes
languageNoita+eng
extract_tablesNo
Behavior5/5

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

With no annotations, the description carries full burden. It discloses cost ($0.01 per doc via USDC), file size limit (20MB), default language (ita+eng), and that it extracts text and tables. No contradictions.

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 sentences plus an arg list, front-loaded with purpose, every sentence adds value. No redundant information.

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?

Given no annotations, no output schema, and 0% schema coverage, the description covers purpose, usage, parameters, cost, and limits. Returns description is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds meaning for all three parameters: file_url (public URL, max 20MB), language (OCR languages, default ita+eng), extract_tables (boolean, default true).

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 clearly states it extracts text and tables from PDF documents. It positions itself as less structured than specialized parsers (siblings) but more flexible, providing clear differentiation.

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?

It explicitly says when to use this tool (generic PDFs, when flexibility is needed) versus specialized parsers. It also mentions the cost, aiding decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fashionmascherine-svg/document-to-json-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server