Skip to main content
Glama

Agent Invoice Rail

wever_agent-invoice-rail
Destructive

Paid URL: 0.10 USDC per call on Base; 10 signed-wallet free calls shared over rolling 30 days. Read the backend 402 body for x402 terms. Keep a private issuer-wallet ledger of invoice amounts, parties, run references and the issuer’s review. Operating boundary: Sign issuer-wallet ownership proof, create the invoice record and attach run references. The issuer reviews those references and records the result. Agents manage the ledger through the API; humans inspect it through their agent. Payment collection uses the separate Invoices product. POST /api/agent-invoice-rail. Existing product credentials, signed mandates, and single-use action grants remain required where applicable. This adapter grants no authority and never supplies server credentials. This current money service follows its published inspection, policy evaluation or private invoice contract. Payment is an API access fee and grants no spending authority.

Input Schema

NameRequiredDescriptionDefault
modeYes
noteNo
usageNo
decisionNo
rail_keyNo
expires_atNo
invoice_idNo
descriptionNo
run_bindingNo
buyer_walletNo
amount_atomicNo
schema_versionYes
buyer_referenceNo
idempotency_keyNo
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • removedInput schema / description
      Removed value: -"The existing product POST body. Supply its documented mode, arguments, and required signed authority or grant. The product validates its full contract."
    • removedInput schema / maxProperties
      Removed value: -64
    • removedInput schema / minProperties
      Removed value: -1
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount_atomic": {
      +        "pattern": "^[1-9][0-9]{0,11}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "buyer_reference": {
      +        "maxLength": 128,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "buyer_wallet": {
      +        "pattern": "^0x(?!0{40})[a-fA-F0-9]{40}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "description": {
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "pattern": "^[^\\u0000-\\u001f\\u007f]+(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "expires_at": {
      +        "maximum": 4102444800,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "idempotency_key": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "const": "create_invoice_reference"
      +      },
      +      "rail_key": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "schema_version": {
      +        "const": "1.0.0"
      +      },
      +      "usage": {
      +        "enum": [
      +          "synthetic",
      +          "operational"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "schema_version",
      +      "mode",
      +      "idempotency_key",
      +      "buyer_reference",
      +      "buyer_wallet",
      +      "rail_key",
      +      "amount_atomic",
      +      "expires_at",
      +      "description",
      +      "usage"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "invoice_id": {
      +        "pattern": "^inv_[a-f0-9]{64}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "const": "read_invoice"
      +      },
      +      "schema_version": {
      +        "const": "1.0.0"
      +      }
      +    },
      +    "required": [
      +      "schema_version",
      +      "mode",
      +      "invoice_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "expected_version": {
      +        "maximum": 3,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "idempotency_key": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "invoice_id": {
      +        "pattern": "^inv_[a-f0-9]{64}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "const": "bind_invoice_to_run"
      +      },
      +      "run_binding": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "receipt_reference": {
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +            "type": "string"
      +          },
      +          "receipt_sha256": {
      +            "pattern": "^[a-f0-9]{64}(?![\\s\\S])",
      +            "type": "string"
      +          },
      +          "return_package_reference": {
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +            "type": "string"
      +          },
      +          "return_package_sha256": {
      +            "pattern": "^[a-f0-9]{64}(?![\\s\\S])",
      +            "type": "string"
      +          },
      +          "run_id": {
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "run_id",
      +          "receipt_reference",
      +          "return_package_reference",
      +          "receipt_sha256",
      +          "return_package_sha256"
      +        ],
      +        "type": "object"
      +      },
      +      "schema_version": {
      +        "const": "1.0.0"
      +      }
      +    },
      +    "required": [
      +      "schema_version",
      +      "mode",
      +      "idempotency_key",
      +      "invoice_id",
      +      "expected_version",
      +      "run_binding"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "decision": {
      +        "enum": [
      +          "approve",
      +          "reject"
      +        ]
      +      },
      +      "expected_version": {
      +        "maximum": 3,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "idempotency_key": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "invoice_id": {
      +        "pattern": "^inv_[a-f0-9]{64}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "const": "review_invoice"
      +      },
      +      "note": {
      +        "maxLength": 500,
      +        "minLength": 1,
      +        "pattern": "^[^\\u0000-\\u001f\\u007f]+(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "schema_version": {
      +        "const": "1.0.0"
      +      }
      +    },
      +    "required": [
      +      "schema_version",
      +      "mode",
      +      "idempotency_key",
      +      "invoice_id",
      +      "expected_version",
      +      "decision",
      +      "note"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / amount_atomic
      Added value: +{
      +  "pattern": "^[1-9][0-9]{0,11}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / buyer_reference
      Added value: +{
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / buyer_wallet
      Added value: +{
      +  "pattern": "^0x(?!0{40})[a-fA-F0-9]{40}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / decision
      Added value: +{
      +  "enum": [
      +    "approve",
      +    "reject"
      +  ]
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "pattern": "^[^\\u0000-\\u001f\\u007f]+(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "maximum": 3,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "maximum": 4102444800,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / invoice_id
      Added value: +{
      +  "pattern": "^inv_[a-f0-9]{64}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / mode / enum
      Added value: +[
      +  "create_invoice_reference",
      +  "read_invoice",
      +  "bind_invoice_to_run",
      +  "review_invoice"
      +]
    • removedInput schema / properties / mode / maxLength
      Removed value: -128
    • removedInput schema / properties / mode / minLength
      Removed value: -1
    • addedInput schema / properties / note
      Added value: +{
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "pattern": "^[^\\u0000-\\u001f\\u007f]+(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / rail_key
      Added value: +{
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / run_binding
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "receipt_reference": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "receipt_sha256": {
      +      "pattern": "^[a-f0-9]{64}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "return_package_reference": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "return_package_sha256": {
      +      "pattern": "^[a-f0-9]{64}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "run_id": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}(?![\\s\\S])",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "run_id",
      +    "receipt_reference",
      +    "return_package_reference",
      +    "receipt_sha256",
      +    "return_package_sha256"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / schema_version
      Added value: +{
      +  "const": "1.0.0"
      +}
    • addedInput schema / properties / usage
      Added value: +{
      +  "enum": [
      +    "synthetic",
      +    "operational"
      +  ]
      +}
    • addedInput schema / required
      Added value: +[
      +  "schema_version",
      +  "mode"
      +]
  2. First observed

TDQS

B3/5.0
Behavior4/5

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

With annotations already flagging destructiveHint=true and openWorldHint=true, the description still adds meaningful context: the 402/x402 pricing terms, free-call allowance, the private issuer-ledger model, the requirement for signed mandates and single-use action grants, and the explicit 'grants no authority and never supplies server credentials' caveat. What it fails to disclose is what the destructive operation actually destroys or what a failed review/version conflict looks like.

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?

The first sentence front-loads pricing and access terms, then the operating boundary appears, then trailing credential/policy boilerplate. The content is dense but riddled with legalese ('This current money service follows its published inspection, policy evaluation or private invoice contract') that does not help an agent decide or call correctly, so several sentences fail to earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-mode, 15-parameter, nested-object tool with no output schema and 0% schema description coverage, the description is far from complete: it does not enumerate modes, explain any parameter, describe return values (e.g., the inv_... id and version counter), or clarify version-conflict behavior implied by expected_version being capped at 3.

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

Parameters2/5

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

Schema description coverage is 0% across 15 parameters including a nested run_binding object, so the description carries the full explanatory burden — and it largely does not deliver. It only gestures at categories ('invoice amounts, parties, run references') without explaining amount_atomic units, buyer_wallet format, invoice_id, expected_version semantics, or the five run_binding sub-fields, leaving the agent to infer everything from regex patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description conveys the general domain — signing issuer-wallet ownership proof, creating an invoice record, attaching run references, and recording a review — and it distinguishes itself from the Invoices product for actual payment collection. However, the four concrete modes (create_invoice_reference, read_invoice, bind_invoice_to_run, review_invoice) are never named, and the purpose is tangled up with pricing and legal boilerplate, so an agent must open the schema to learn what operations exist.

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?

There is one explicit routing statement — 'Payment collection uses the separate Invoices product' — which tells the agent when not to use this tool. The 'Operating boundary' sentence also implies the human-issuer review flow. But no guidance separates this rail from the many sibling rails (decision-packet-rail, work-order-rail, escrow-lite), and there is no indication of which mode to pick for which task.

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.