Skip to main content
Glama

Subpay Invoice Reader

Read an invoice and check that it adds up

extract_invoice

Reads invoices, bills and receipts from PDF into structured JSON — vendor, customer, dates, PO, line items, discount, tax, shipping, total, balance due — and checks the arithmetic: quantity × unit price, lines to subtotal, tax rate, total and balance due. The response says exactly which figures don't add up. Returns vendor, customer, invoice number, dates, PO, line items, subtotal, discount, taxes, shipping, total, amount paid and balance due, plus checks (passed true/false, or null when the figures aren't printed). $0.04 per page (up to 25 pages) in USDC per successful read via x402, quoted before you pay; failed reads are free.

Input Schema

NameRequiredDescriptionDefault
documentYesThe PDF, base64-encoded (a data: URL prefix is fine). Max about 3 MB and 25 pages.
fileNameNoOriginal file name, if known.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does much of it: it discloses the pricing model ($0.04/page in USDC via x402), that the quote comes before payment, that failed reads are free, and page/size limits. It also explains the null semantics of the checks ('null when the figures aren't printed'). It does not cover latency, retry behavior, or rate limits, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and information-dense, but it repeats the field list twice (the opening extraction inventory and the 'Returns vendor, customer, invoice number...' sentence), which is partially redundant. The pricing sentence is valuable, but a tighter single field list would have earned the same meaning in fewer words.

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?

There is no output schema, so the description must describe the return contract, and it does so thoroughly: extracted fields, the arithmetic checks, the passed true/false values, and the null case. Combined with the cost and input constraints, an agent has everything needed to call and interpret it.

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% for both parameters, so the schema already documents 'document' (base64 PDF, data: URL prefix, ~3 MB/25 pages) and 'fileName'. The description restates the PDF/page constraints but adds no parameter-level syntax or format detail beyond the schema. Baseline 3 applies.

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 states a specific verb and resource ('Reads invoices, bills and receipts from PDF into structured JSON') and then enumerates the extracted fields and the added arithmetic-validation behavior. It is unambiguous what the tool does; the only sibling ('about') is not a competing extraction tool, so no differentiation is required.

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?

Usage context is implied by scope ('PDF', 'max about 3 MB and 25 pages', per-page pricing) but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent can infer applicability from the input constraints, but nothing routes it or sets prerequisites beyond that.

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