Skip to main content
Glama
luca-network

SPR (Sealed Payment Record)

Official

cancel_intent

Idempotent

Withdraw a declared payment intent when a purchase is no longer needed, sealing the reason so no payment can be checked or recorded against it.

Instructions

Call this when you decide not to pay an intent you declared, or the purchase is no longer needed. Withdraws the intent so no payment can be checked or recorded against it, and seals the withdrawal with the reason. Returns the sealed withdrawal: the intent's ID, the reason and when it was withdrawn. Calling it again for the same intent returns the same withdrawal. Use get_intent first if you are not sure the intent is still open.

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy the purchase won't go ahead, in one sentence, such as 'The supplier's price rose above the cap'. An auditor reads it.
intent_idYesThe intent's ID as record_intent returned it, such as int_c8cc151ca5ca8c18960d

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / intent_id / description
      Added value: +"The intent's ID as record_intent returned it, such as int_c8cc151ca5ca8c18960d"
    • addedInput schema / properties / reason / description
      Added value: +"Why the purchase won't go ahead, in one sentence, such as 'The supplier's price rose above the cap'. An auditor reads it."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing the semantic effect (no payment can subsequently be checked or recorded against the intent), the sealing of an audited reason, and the exact return payload. The repeat-call behaviour mostly restates idempotentHint=true, and it doesn't say whether a cancelled intent can be reopened, so it falls just short of a 5.

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?

Four short sentences, front-loaded with the trigger condition, followed by effect, return value, idempotency and prerequisite in that order. Every sentence carries distinct information.

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

Completeness5/5

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

No output schema exists, and the description compensates by naming the return contents (intent ID, reason, withdrawal time). Combined with full parameter coverage and annotations, an agent has everything needed to call this correctly.

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 description coverage is 100%, so both parameters are already documented, including the intent ID format and the auditor-facing reason requirement. The description reinforces the reason's role ('seals the withdrawal with the reason') but adds no new syntax or constraints, which matches the baseline of 3 when the schema does the heavy lifting.

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 and resource ('withdraws the intent so no payment can be checked or recorded against it') plus the consequence of the action. This is clearly distinguishable from siblings such as record_intent, check_payment and record_settlement without opening any schema.

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?

Gives explicit when-to-use conditions ('when you decide not to pay an intent you declared, or the purchase is no longer needed') and names the prerequisite alternative: 'Use get_intent first if you are not sure the intent is still open.' The routing decision is fully specified.

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