Skip to main content
Glama

CallMeter

parse.invoice

Read-onlyIdempotent

Parse a tax invoice or commercial invoice into the AfricaInvoiceReceipt contract: seller (TIN / KRA PIN / VAT no), issued date, currency, line items, VAT rate/amount, subtotal, total, payment refs, confidence, and warnings (including vat_total_mismatch). Built for NG/KE/GH/ZA AP automation and multi-line SKU invoices — not a thin keyword grep. Use when the document is an invoice rather than a till slip; still accept OCR text or image/PDF base64. Nulls mean unknown; do not treat low-confidence totals as ledger truth without checking confidence and warnings. Costs $0.15 (15 credits) per successful response; fail-closed prepaid or x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoOCR or plain-text dump of the tax invoice. Example: 'TAX INVOICE\nDANGOTE CEMENT PLC\nTIN: 01012345-0001'
tierNoProcessing tier. Example: autoauto
filenameNoOriginal filename hint. Example: invoice.pdf
file_base64NoPDF or image bytes as base64
content_typeNoMIME type of file_base64. Example: application/pdf

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
taxYes
buyerNo
totalYes
paymentNo
currencyYes
doc_typeYes
merchantYes
subtotalYes
warningsYes
issued_atYesYYYY-MM-DD or null
confidenceYes
line_itemsYes
amount_paidNo
balance_dueNo
document_idNo
locale_hintsNo
raw_text_excerptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive. The description adds substantial behavioral context: it is 'not a thin keyword grep', nulls mean unknown, low-confidence totals should not be treated as ledger truth, and it fails closed with cost per successful response. No contradiction with annotations.

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?

Description is dense but purposeful: front-loaded output contract, then usage rule, input formats, and key behavioral caveats. Every sentence contributes, though a few details (e.g., 'still accept OCR text or image/PDF base64') overlap with the schema.

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 complex extraction tool with an output schema, this description is remarkably complete: it names the extracted fields, the warning type, the country scope, the input modes, the confidence/null semantics, and even the cost/failure behavior. Nothing required to select or call the tool 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 description coverage is 100%, so the baseline is 3. The description reinforces that text OR file_base64 is accepted and maps to the oneOf, but does not add meaningfully deeper semantics for tier, filename, or content_type beyond the schema's own descriptions.

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 states a specific verb ('Parse') and resource ('tax invoice or commercial invoice') and enumerates the concrete output contract (seller, dates, VAT, totals, warnings). It also explicitly distinguishes from till slips/receipts, helping differentiate from sibling parse.receipt.

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?

Gives clear usage condition: 'Use when the document is an invoice rather than a till slip.' It also mentions the input forms it accepts and the target geographies/AP automation context. It doesn't explicitly name sibling tools or exclusions beyond the till-slip case, but the guidance is sufficient.

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