Skip to main content
Glama

agent_invoice

Create EIP-712 payment challenge invoices, verify settlement proofs, and manage the full agent-to-agent invoice lifecycle for direct peer hiring without custodial wallets.

Instructions

    [Cost: $0.0010 USDC on Base & Solana] Autonomous agent-to-agent micro-invoicing.

    Issue EIP-712 payment challenge invoices, verify on-chain settlement proofs,
    and manage the full A2A invoice lifecycle (create → settle → expire/cancel).
    Enables peer-to-peer agent hiring without custodial wallets or human intermediaries.

    Actions:
      create  — Issue a new invoice with EIP-712 typed-data challenge.
                Params: {
                  "payee_agent_id": "agent:sairen/extractor",
                  "amount_usdc": "0.005",
                  "payer_agent_id": "agent:claude/orchestrator",   # optional
                  "token": "USDC",                                  # optional (default USDC)
                  "chain": "base",                                  # optional (base|solana|arbitrum|...)
                  "service_description": "Web page extraction",     # optional
                  "ttl_seconds": 3600                               # optional (60–86400)
                }
      verify  — Confirm settlement with transaction hash or EIP-712 signature.
                Params: {"invoice_id": "inv_...", "tx_hash": "0x..."}
      status  — Inspect current invoice state.
                Params: {"invoice_id": "inv_..."}
      cancel  — Void a pending invoice (payee-initiated).
                Params: {"invoice_id": "inv_..."}
      list    — Query invoices by payer, payee, or state.
                Params: {"payer_agent_id": "agent:...", "state": "pending", "limit": 10}

    Invoice States: pending → settled | expired | cancelled

    Args:
        action: Lifecycle action (create/verify/status/cancel/list).
        params: Action-specific parameter dictionary.
        payment_signature: x402 Base USDC transaction hash (defaults to dev mock key).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNocreate
paramsNo
payment_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

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 full behavioral disclosure burden. It does well by revealing cost, on-chain settlement verification, lifecycle state transitions, cancel/expire semantics, and the dev mock key default for payment_signature. It does not detail failure modes, return shapes, or error conditions, but the disclosed behavior is substantial and non-contradictory.

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?

The description is long but well structured: cost and core purpose first, then Actions with inline params, Invoice States, and Args. The Args section partially repeats the schema, and the action parameter details could be trimmed, but the organization and front-loading keep it navigable.

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 complex financial lifecycle tool with no output schema and no annotations, the description is unusually complete: it defines all actions, state transitions, parameter examples, defaults, and payment signature behavior. It stops short of specifying response/output formats or error handling, which would round out an agent's ability to interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is generic and has 0% description coverage, but the description richly compensates. It provides per-action parameter dictionaries with concrete examples, defaults, units, allowed chains, and value ranges such as ttl_seconds (60–86400) and amount_usdc '0.005'. This is far more than the schema offers.

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 opens with a crisp, specific definition: 'Autonomous agent-to-agent micro-invoicing' and enumerates the exact lifecycle actions (create, verify, status, cancel, list) and invoice states. It clearly distinguishes this tool from financial sibling tools like create_task_bounty_escrow and release_task_bounty by focusing on A2A payment-challenge invoices rather than escrow/bounty workflows.

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?

The description states when to use the tool: for peer-to-peer agent hiring and A2A micro-invoicing without custodial wallets or human intermediaries. It provides clear operational context through the action list, though it does not explicitly name alternatives or state exclusion criteria relative to sibling tools like create_task_bounty_escrow.

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