Skip to main content
Glama

parse_invoice

Extract structured JSON data from invoice PDFs. Parse seller, buyer, line items, totals, and payment info from European and international invoices.

Instructions

Extract structured data from an invoice PDF.

Returns JSON with seller, buyer, line items, totals, and payment info.
Supports European (Fattura Elettronica) and international invoice formats.

Args:
    file_url: Public URL of the PDF file (max 20MB).
    language: Document language(s) for OCR. Default: ita+eng.
    extract_line_items: Whether to extract individual line items. Default: true.
    validate_totals: Validate that line item sums match declared totals. Default: false.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlYes
languageNoita+eng
extract_line_itemsNo
validate_totalsNo
Behavior3/5

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

No annotations provided, so description carries full burden. Documents cost ($0.02 per document, x402 USDC on Base) and file size limit (20MB). Missing rate limits, idempotency, error behavior, or authentication requirements.

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 purpose and returns, followed by supported formats and parameter list. Efficiently written, but cost info placed at end and could be integrated earlier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers input requirements, parameters, cost, and supported formats. Lacks output schema description, error handling, timeout, and authentication details. Adequate but missing operational context given no output schema and expected complexity.

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?

Adds meaning to all 4 parameters with details not in schema: file_url (public URL, max 20MB), language (document language, default ita+eng), extract_line_items (boolean, default true), validate_totals (boolean, default false). Fully compensates for 0% schema description coverage.

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?

Clearly states 'Extract structured data from an invoice PDF' and specifies return fields (seller, buyer, line items, totals, payment info). Mentions support for European and international formats, differentiating from sibling tools like parse_bank_statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for invoices via tool name and supported formats, but provides no explicit guidance on when to use or when not to use, nor mentions alternatives like parse_generic_document.

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