Skip to main content
Glama

Quantum Atlas Stripe X402 Agent Payment Hub

Decide Spend Escalation Approval

x402_decide_approval
Idempotent

Approve once (15-minute single-use redemption window) or deny a pending subagent spend escalation ticket (sba_*). Use this as the master account operator after reviewing pending tickets via x402_get_account; do not use this to open a new escalation ticket (use x402_request_approval) or permanently change a subagent policy (use x402_update_delegate_key). Requires a master sbk_* spend key (delegated keys receive HTTP 403). Approved tickets bind exact principal, route, and cent amount and are atomically consumed on first spend to prevent replay (returns 404/409/410 if missing, already decided, or expired).

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": {
      "approval_id": "<approval_id>",
      "decision": "<decision>"
    },
    "name": "x402_decide_approval"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoOptional operator audit note recorded with the approval or denial decision.
decisionYesOperator decision: "approve" grants a single-use 15-minute execution pass; "deny" permanently rejects the escalation ticket.
spend_keyNoMaster Stripe account spend key (format: sbk_<43+ chars>). Delegated subagent keys are rejected with HTTP 403. Optional if supplied via the x-atlas-spend-key HTTP header.
approval_idYesSingle-use human spend escalation approval ticket identifier returned by x402_request_approval (format: sba_<16 hex chars>, e.g. sba_aabbccddeeff0011).

Output Schema

NameRequiredDescriptionDefault
okYesTrue when the approval decision was recorded.
approvalNo
approval_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: the 15-minute single-use redemption window, atomic first-spend consumption to prevent replay, principal/route/cent binding, and the 404/409/410 failure modes on missing, already-decided, or expired tickets. The only residual gap is that it doesn't reconcile the 'already decided' error with idempotentHint=true or say whether a deny can be reversed.

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 action and the ticket prefix, then routing guidance, then behavioral caveats; every clause carries information. It is however a single dense paragraph with stacked parentheticals, which costs a little scannability.

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?

For a low-blast-radius decision tool with a full input schema and an output schema, the description covers authority requirements, decision consequences, and failure codes, so an agent has everything needed to call it correctly and interpret errors.

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?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning by explaining what an approval binds (exact principal, route, and cent amount) and that the pass is single-use, which the schema only implies. The optional audit note parameter is not elaborated in prose.

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 specific verbs (approve once / deny) against a specific resource (pending subagent spend escalation ticket, sba_*), and immediately names the two siblings whose jobs differ (x402_request_approval, x402_update_delegate_key). An agent can distinguish this from every listed sibling without opening a 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 caller context (master account operator, after reviewing pending tickets via x402_get_account), an explicit when-not for ticket creation and for permanent policy changes, each with the named alternative. Prerequisites (master sbk_* key, 403 on delegated keys) are stated inline.

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.

Resources