Skip to main content
Glama
SPR (Sealed Payment Record)

SPR (Sealed Payment Record)

Official

record_intent

Declares what an AI agent is buying and why before any payment, creating a sealed, auditable intent record that can be checked against limits and later verified.

Instructions

Call this first, whenever you are about to pay for anything (an x402 request, an API, data, compute, a card or Stripe payment): declare what you are buying and why, before paying. Sealed in your company's book. Amounts are integers in the currency's minor unit (cents; 6 decimals for USDC).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "purpose": "<purpose>"
    },
    "name": "record_intent"
  }
}

Input Schema

NameRequiredDescriptionDefault
railNo
productNoOptional: what is being bought, such as an API plan, a dataset or a SKU
purposeYesWhy you are paying, in one sentence. This is what an auditor reads.
currencyNo
payee_idNoOptional: who is to be paid, as scheme:value, such as wallet:0x59dd… for an x402 or onchain payment, or domain:data.example. Give it whenever you know it: check_payment then refuses a payment to anyone else, and a mandate that lists its payees refuses a payee not on the list.
expires_inNoISO 8601 duration (PT1H, P3D)
counterpartyNo
max_amount_minorNoThe most you may pay
expected_amount_minorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • addedInput schema / properties / payee_id
      Added value: +{
      +  "description": "Optional: who is to be paid, as scheme:value, such as wallet:0x59dd… for an x402 or onchain payment, or domain:data.example. Give it whenever you know it: check_payment then refuses a payment to anyone else, and a mandate that lists its payees refuses a payee not on the list.",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare this is a non-read-only, non-destructive, non-idempotent, closed-world write. The description adds real value beyond that: 'Sealed in your company's book' conveys an immutable audit record, and the minor-unit rule gives an encoding constraint the annotations cannot express. It does not mention that the non-idempotent hint means a repeated call likely produces a duplicate intent, which is the one behavioral gap worth flagging.

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 imperative 'Call this first' leads, followed by scope, then the invoicing guarantee and the unit convention; no sentence is filler. The parenthetical enumeration of payment types is long but each item earns its place by disambiguating scope, so the only minor cost is density.

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

Completeness3/5

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

For a 9-parameter write tool with no output schema, the description covers the calling trigger, immutability, and amount encoding but omits what the call returns (presumably an intent identifier) and how that result feeds check_payment or record_settlement. That linkage is central to the workflow the description positions itself in, so completeness is adequate but not full.

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?

With 56% schema coverage, the description compensates on the highest-risk ambiguity by defining amount encoding (integer minor units, cents, 6 decimals for USDC), which the schema leaves unstated for max_amount_minor and expected_amount_minor. It says nothing about rail, currency, counterparty, or expires_in, so several parameters remain documented only by (or not at all by) 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?

The description names a precise action ('declare what you are buying and why, before paying') and the resource it lands in ('your company's book'), so an agent understands it creates a pre-payment declaration record. It also enumerates the payment contexts (x402, API, data, compute, card, Stripe) that this covers, which separates it from siblings like check_payment and record_settlement.

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?

The trigger is explicit and front-loaded: 'Call this first, whenever you are about to pay for anything,' followed by a concrete list of payment types. The ordering constraint relative to paying ('before paying') is stated directly, leaving nothing to inference.

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