Skip to main content
Glama

Parse Invoice

document.parse_invoice
Read-onlyIdempotent

Parse a receipt or invoice document into structured fields. Uses a quality AI model for accuracy. Use when you need to extract line items, totals, and merchant info from financial documents. For general document text, use document.extract_text instead. Returns: { invoice: { merchant, date (YYYY-MM-DD), line_items[], subtotal, tax, total }, cited: { : { value, confidence: "high"|"medium"|"low", citations: [{ quote, paragraphs[] }] } } } Example prompts:

  • "Parse this invoice and give me the line items and total."

  • "Extract the merchant, date, and amounts from this receipt."

  • "Read this scanned invoice and return structured data."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mime_typeYesMIME type of the document. Example: "application/pdf" for scanned invoice PDF, "image/jpeg" for a receipt photo.
document_base64YesBase64-encoded PDF or image of the receipt/invoice (max ~15 MB). Example: "JVBERi0xLjcNJeLjz9MNCj..." (base64-encoded invoice PDF)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
citedYes
invoiceYes

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description avoids repeating that. It adds value by mentioning 'Uses a quality AI model for accuracy' and detailing the return structure, which helps the agent understand capabilities and output format. 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?

Description is concise with clear sections: purpose, usage, return format, and example prompts. Every sentence adds value, no fluff. Front-loaded with purpose and usage.

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 an output schema is provided in the description, and schema coverage is 100%, the description is complete. It covers what the tool does, when to use, output structure, and examples. No missing information for effective use.

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% with detailed descriptions for both parameters (mime_type enum, base64 example with max size). Description does not add per-parameter info but is not needed as schema covers it. 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?

Description clearly states 'Parse a receipt or invoice document into structured fields.' It specifies the exact resource (financial documents) and action (parse into structured fields). Also distinguishes from sibling tool 'document.extract_text' for general text.

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?

Explicitly says 'Use when you need to extract line items, totals, and merchant info from financial documents. For general document text, use document.extract_text instead.' Provides clear context and an alternative, making it easy for an agent to decide.

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.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, grouped by domain (account, bundle, collection, document, job, receipt, url). Descriptions and naming make it easy to differentiate between similar tools like url.extract vs document.extract_text or collection.search vs collection.ask.

Naming Consistency5/5

All tools follow the same prefix.group_action pattern in snake_case (e.g., account.quota, bundle.get, collection.create). No mixing of conventions, making the API predictable and easy to navigate.

Tool Count5/5

With 22 tools, the server covers a comprehensive set of operations for document and evidence management. Each tool serves a specific purpose, and the count feels well-scoped without being bloated or sparse.

Completeness3/5

The tool surface lacks explicit create and delete operations for bundles and collections. Bundles appear to be created externally, and there is no tool to remove a bundle or collection. This is a notable gap given the server's stated purpose.

Resources