Skip to main content
Glama
402Protocol

four02-commerce-mcp

Official
by 402Protocol

four02_invoice_status

Verify a signed 402 invoice cryptographically and check heuristically if it looks paid by scanning Ink USDC Transfer events to the issuer. Payment detection is likely, not certain.

Instructions

Verify a signed 402 invoice (pure cryptography, no trust needed) and heuristically check whether it looks paid by scanning Ink USDC Transfer events to the issuer. Payment detection is a heuristic — "likely paid", never certain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lookbackBlocksNoHow many recent blocks to scan for payment
signedInvoiceJsonYesThe signed invoice JSON (as produced by four02_invoice_create)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 it does well: it splits the tool into a deterministic cryptographic verification and a heuristic payment check, names the chain and event kind scanned (Ink USDC Transfer to the issuer), and explicitly flags uncertainty. It omits error behavior and the read-only/no-side-effect nature, but the core behavioral profile is unusually well disclosed.

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?

Two tight sentences with zero waste; the primary action (cryptographic verification) is front-loaded and the heuristic caveat follows immediately.

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?

For a two-parameter tool with no annotations and no output schema, the description supplies the key semantics of the result (verified signature versus a probabilistic paid signal) plus the chain/event basis. It does not sketch the response shape, but the essential decision-relevant context is present.

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%, so both parameters are already documented, including lookbackBlocks' purpose and bounds. The description adds useful context about what the block scan is looking for (Ink USDC Transfer events to the issuer), but not format or syntax detail beyond the schema, so the baseline 3 holds.

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: verify a signed 402 invoice, then heuristically test whether it has been paid. It is clearly distinguishable from four02_invoice_create (produce the invoice) and four02_invoice_pay (make payment).

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 is implied rather than stated: an agent can infer this runs after four02_invoice_create to check status, and the note that detection is heuristic ('likely paid', never certain) warns against treating it as authoritative. However, there is no explicit when-to-use, when-not, or named alternative, so this remains implied guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.