Skip to main content
Glama

Invoice Extract

invoice_extract
Read-only

Structured data from an invoice: seller and buyer (name, address, tax ID), invoice number, dates, currency, line items, subtotal, tax, total and payment details, with null for anything absent. The arithmetic is checked (line sum against subtotal, subtotal plus tax against total) and mismatches are returned. PDF with a text layer by URL or base64, or plain text. Price: $0.005 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
urlNohttps link to a PDF invoice with a text layer (JSON body field)
textNoThe invoice text (JSON body field); or give url or pdf_base64 instead
pdf_base64NoThe PDF as base64, up to 15 MB (JSON body field)

Output Schema

NameRequiredDescriptionDefault
modelNo
checksNo
sourceNo
invoiceNo
checkedAtNo
disclaimerNo
allChecksPassNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint), the description discloses behavior the structured fields cannot: absent fields are returned as null, cross-field arithmetic is validated and mismatches are surfaced, and pricing/billing semantics are given ($0.005 USDC per successful call via x402; failed calls not charged). That last point is critical operational context for an agent deciding whether to invoke.

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?

Front-loaded with the extraction output, then validation behavior, then accepted inputs, then cost — each sentence carries distinct, necessary information with no filler or repetition of the tool name.

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 and no required parameters, the description covers input formats, null/validation behavior, and payment terms. Nothing an agent needs to call 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 coverage is 100%, so the schema already documents url, text, and pdf_base64. The description only reinforces the format constraint (text-layer PDF) and the mutual-exclusivity of the three inputs, adding marginal value over the schema. 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 names a specific verb+resource (extract structured data from an invoice) and enumerates the exact fields returned (seller/buyer, tax IDs, dates, line items, totals, payment details). An agent can immediately distinguish this from generic siblings like pdf, ocr, or extract because it commits to invoice-specific output.

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?

It implies usage context by stating accepted inputs ('PDF with a text layer by URL or base64, or plain text'), which is useful for routing, but it never names an alternative (e.g., use ocr for scanned PDFs without a text layer) or gives an explicit when-to-use/when-not statement relative to siblings.

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