Skip to main content
Glama
luca-network

SPR (Sealed Payment Record)

Official

record_settlement

Idempotent

Records a successful payment as a sealed, intent-matched entry after settlement, verifying it against caps and expiry and returning conflicts for altered facts unless a correction reason is supplied.

Instructions

Call this right after each payment succeeds, with the rail's own reference. Records the payment: sealed, matched to its intent, checked against its cap and expiry. The same payment again returns unchanged. Different facts for a payment already sealed return conflict and seal nothing, unless you give correction: { reason }.

Input Schema

NameRequiredDescriptionDefault
memoNo
railYes
nonceNo
stateNo
networkNoOptional: the network it settled on, such as base or solana
receiptNoOptional: where the receipt or invoice is kept, and its hash; never the receipt itself
currencyYes
directionNo
intent_idNo
source_idYesThe rail's own reference: transaction hash, charge ID
correctionNoOnly to correct a payment already sealed: the new version says why
occurred_atYesWhen the rail says the payment was made, in ISO 8601 with its offset (2026-10-28T19:00:00Z or 2026-10-28T12:00:00-07:00)
amount_minorYes
counterpartyNo
evidence_typeNoOptional: onchain for a blockchain transaction, provider_reference for a payment provider's reference
counterparty_idNoOptional: how the payee is identified, as scheme:value, such as domain:data.example or wallet:0x…
counterparty_typeNoOptional: organization, person, service or agent
settlement_providerNoOptional: who settled the payment, such as the x402 facilitator

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the idempotent/non-destructive annotations, it discloses the replay semantics ('the same payment again returns unchanged'), the conflict behavior ('different facts ... return conflict and seal nothing'), and the escape hatch ('unless you give correction: { reason }'). It also reveals the validation performed (cap and expiry checks) and that records become immutable ('sealed'), which annotations cannot convey.

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 the trigger and the rule, then the idempotency and correction conditions, in three dense sentences with no filler. The telegraphic phrasing ('sealed', 'Different facts') is compact but slightly terse for an unfamiliar domain.

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 an 18-parameter mutation with nested objects and no output schema, it covers the crucial behavioral contract (idempotency, conflict, correction, immutability). It omits how the record is matched to its intent and what errors a failed cap or expiry check produce, which an agent would want.

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 50% across 18 parameters, and the description only adds meaning for source_id (the rail's reference) and correction.reason. It gives no guidance on amount_minor, currency, occurred_at, intent_id, direction, or the counterparty/evidence fields, so half the surface is left to the schema alone.

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 (records) and resource (the payment), plus the trigger ('right after each payment succeeds') and the key input ('the rail's own reference'). The sealing/matching/cap-and-expiry framing makes it clearly distinguishable from record_intent, which would create the intent rather than seal the resulting payment.

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?

Explicitly says when to call ('right after each payment succeeds, with the rail's own reference') and spells out the conflict and correction paths. It does not name sibling tools or say when to use check_payment or verify_record instead, so no explicit alternative routing.

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