Skip to main content
Glama

docs

Verify Invoice

verify_invoice
Idempotent

Verify extracted invoice fields: arithmetic consistency, line-item totals, JP registration number check-digit + corporate-number existence observation (official Japan NTA registry), accounting-ready JSON. $0.015/call. Choose this when you already HAVE invoice fields (from your own extraction) and only need them checked; to start from a PDF use document_pipeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesExtracted invoice fields: total_jpy, tax_jpy, reg_no, invoice_no, issue_date, due_date, vendor, customer
x_paymentNoOptional: base64 X-PAYMENT header value (x402 exact scheme, USDC on Base mainnet). Omit it to receive the payment requirements (accepts[] + docs) for this call without being charged.
line_itemsNoOptional line items [{description, amount_jpy}] to reconcile against the subtotal

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesJSON body of the underlying call (see /samples/{product} for each product's shape)
statusYesHTTP status of the underlying call (200 result, 402 payment terms, 4xx input error)
how_to_payNo
receipt_idNoset on paid results; free re-fetch via get_receipt
payment_requiredNotrue when status is 402: body holds x402 payment terms, not a result. Pay and call again with x_payment

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?

Annotations cover the safety profile (destructiveHint=false, idempotentHint=true, openWorldHint=true for the NTA lookup), so the description's added value is the per-call price ($0.015/call) and the specific external check performed. It does not explain how the x_payment charge/accepts flow interacts with a failed verification, which keeps it short of 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.

Conciseness4/5

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

Front-loaded with what gets checked, then price, then routing guidance in a single compact block. Dense but each clause carries information; the only mild redundancy is restating 'invoice' across the check list.

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?

Output schema exists so return values need not be re-explained, and the mention of 'accounting-ready JSON' plus the precise check list, cost, and sibling routing covers everything an agent needs to call this correctly.

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 coverage is 100% and the schema itself documents fields, x_payment, and line_items, so baseline is 3. The description only lightly reinforces this by naming 'line-item totals' and the per-call fee; it adds no format, enum, or validation detail beyond the schema.

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?

States a specific verb (verify) plus resource (extracted invoice fields) and enumerates the actual checks performed: arithmetic consistency, line-item totals, JP registration check-digit, and NTA registry lookup. It also explicitly separates itself from document_pipeline, so an agent can pick it without opening either schema.

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?

Gives an explicit when-to-use ('when you already HAVE invoice fields from your own extraction') and an explicit when-not with the named alternative ('to start from a PDF use document_pipeline'). Routing is unambiguous.

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