Skip to main content
Glama

Agent Toolkit (all-in-one)

Invoice & receipt reader: vendor, dates, line items, taxes and totals as JSON, with an independent maths check

read_invoice

[Web Reader Pro] Reads an invoice, bill or receipt (text, web page, PDF or image URL) and returns vendor, customer, invoice number, dates, currency, line items, discounts, taxes, shipping, total and amount due. Then re-does the maths itself: quantity x price per line, lines vs subtotal, tax rates, subtotal + tax = total, paid vs due, due date after issue date. maths_ok=false means a human should look before paying. Not charged if the document is not an invoice. Price 0.02 USDC per call; first 3 calls per day free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoInvoice/receipt URL (PDF, web page, JPG/PNG)
textNoOr the invoice text
paymentNoOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does so well: it discloses the cost (0.02 USDC per call), the free tier (first 3 calls per day), the no-charge case, and the meaning of the maths_ok outcome flag. It does not cover error behavior or what happens when both url and text are supplied, which keeps it below the top mark.

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?

Three dense sentences, front-loaded with what is read and returned, followed by the verification logic, then the billing terms. The vendor prefix is the only extraneous element; every other clause carries information an agent needs.

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?

There is no output schema, and the description compensates by listing the returned fields and explaining the maths_ok flag, so an agent knows what comes back. It is slightly incomplete on failure modes and on precedence when both url and text are provided.

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 coverage is 100%, so the baseline is 3; the description still adds value by enumerating accepted document formats and by explaining that the payment parameter is an x402 charge that is unnecessary during the free sample. That clarifies the optional, conditional nature of the payment field beyond the schema text.

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 an invoice, bill or receipt) and enumerates exactly what it returns — vendor, customer, invoice number, dates, currency, line items, taxes, total, amount due — plus an independent arithmetic verification. That is far more than the name conveys and distinguishes it from generic readers like read_url or extract_fields.

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?

It gives clear input context (text, web page, PDF or image URL) and a decisive usage signal: 'maths_ok=false means a human should look before paying', plus a billing condition ('Not charged if the document is not an invoice'). It does not explicitly route against siblings such as read_url or extract_fields, so it stops short of full when-not guidance.

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.