Skip to main content
Glama

Parse Invoice/Receipt

parse_invoice

Extract structured data from an invoice or receipt: vendor, invoice number, dates, currency, subtotal, tax, total, and line items. Accepts a text-based PDF, or an image when is_image is true (OCR is applied first). Returns JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlNoPublic http(s) URL of the file
is_imageNoSet true when the file is a photo/scan image rather than a PDF
file_base64NoBase64-encoded file contents (data-URI prefix allowed)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden of disclosing behavior. It explains that images undergo OCR first, that PDFs must be text-based, and that the result is JSON. It does not cover failure modes, limits, or authentication, but the disclosed traits are meaningful and go beyond what the schema states.

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?

The description is two sentences, front-loaded with the purpose and output fields, then addressing input handling and return format. Every clause contributes useful information with no filler or repetition.

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

Completeness4/5

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

The tool has no output schema, so the description carries the burden of explaining return values; it does so by listing the extracted fields and stating 'Returns JSON.' It also covers the two input modes (PDF vs. image). It lacks details on error handling or file size limits, but for its apparent simplicity it is reasonably complete.

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 descriptions cover all three parameters, giving a baseline of 3. The description adds extra meaning by explaining the interaction between file type and the is_image flag, and by stating that a comma-separated list of extraction fields will be emitted. This enriches the parameter semantics without contradicting the schema.

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 opens with a specific verb and target ('Extract structured data from an invoice or receipt') and enumerates the output fields, making the tool's purpose immediately clear. It differentiates itself from sibling tools by focusing on invoice/receipt-specific structured extraction rather than generic table extraction or OCR.

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?

The description gives clear context on when to use the tool: for invoices/receipts, and it clarifies the input mode ('text-based PDF' vs. 'image when is_image is true'). It does not explicitly name alternative sibling tools or state when *not* to use it, so it falls short of a 5.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct document processing task: table extraction, image OCR, invoice parsing, PDF-to-markdown conversion, and markdown-to-PDF rendering. Even though parse_invoice can process images, its structured output clearly differentiates it from ocr_image.

Naming Consistency4/5

Four tools follow a clear verb_noun pattern (extract_tables, ocr_image, parse_invoice, render_pdf). However, pdf_to_markdown breaks the pattern by using a source_to_target format instead of a verb-first name, creating a minor inconsistency.

Tool Count5/5

Five tools is a well-scoped count for a document processing server. Each tool serves a distinct purpose without redundancy, covering input (PDF, image), processing (extraction, OCR, parsing), and output (markdown, PDF).

Completeness4/5

The toolkit covers a coherent document workflow: extract text/tables from PDFs, OCR images, parse invoices, convert to markdown, and generate PDFs. A minor gap is the lack of direct scanned-PDF handling (requires manual page-to-image conversion), but this is workable around.

Resources