Skip to main content
Glama

extract_receipt

Extract structured data from receipts and invoices using AI. Returns merchant, date, line items, totals, tax, and expense category as JSON. Pay per request with Bitcoin Lightning.

Instructions

Extract structured data from receipts, invoices, and financial documents. Uses a dual-model pipeline (Mistral OCR + Kimi K2.5) for high-accuracy extraction. Returns JSON with merchant, date, line items, totals, tax, currency, and expense category. Handles crumpled receipts, faded text, and multi-page invoices. 50 sats/page. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='extract_receipt'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesValid payment ID (must be paid)
documentBase64YesBase64 encoded receipt/invoice image or PDF
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses the dual-model pipeline (Mistral OCR + Kimi K2.5), capabilities (crumpled, faded, multi-page), pricing model, payment flow (requires create_payment), and authentication method (Bitcoin Lightning, no API key). This provides comprehensive behavioral insight.

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?

The description is somewhat lengthy but each sentence adds value. It is well-structured with clear information about purpose, process, and requirements. A slight reduction in wordiness could improve conciseness without losing essential detail.

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 there is no output schema, the description explains the return format (JSON with merchant, date, line items, etc.) and the overall pipeline. It covers cost, payment method, and limitations. For a 2-parameter tool, this is highly complete and leaves minimal ambiguity.

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 coverage is 100% with both parameters described. The description adds meaningful context: paymentId must be a valid paid payment from create_payment with toolName='extract_receipt', and documentBase64 is a base64-encoded image or PDF. This goes beyond the schema definitions.

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 'Extract structured data from receipts, invoices, and financial documents' and lists specific output fields (merchant, date, line items, etc.). It distinguishes itself from siblings like 'extract_document' by focusing on financial documents and mentioning the dual-model pipeline.

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 provides usage context: handles crumpled receipts, faded text, and multi-page invoices. It also explains pricing (50 sats/page) and payment requirements. However, it does not explicitly tell when not to use this tool or compare with similar tools like 'extract_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/cnghockey/sats4ai-mcp-server'

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