Skip to main content
Glama

Quantum Atlas Stripe X402 Agent Payment Hub

Issue Delegated Subagent Key

x402_issue_delegate_key

Mint a new budget-capped, route-scoped, expiring delegated spend key (sbk_*) for a subagent or automated workflow backed by your master Stripe account. Use this to provision least-privilege spending credentials for a new subagent; do not use this to adjust limits on an existing key (use x402_update_delegate_key) or disable a key (use x402_revoke_delegate_key). Requires a master sbk_* spend key (delegated keys receive HTTP 403). Returns the secret child spend key exactly once — persist it in a secret store because later x402_get_account calls return only masked hints.

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": {
      "label": "<label>"
    },
    "name": "x402_issue_delegate_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesHuman-readable label identifying the subagent or workflow (1-80 chars, e.g. "harbor-monitor-agent").
agent_idNoOptional stable machine agent identifier recorded on spend audit rows (e.g. "agent.cursor.prod-01").
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.
ttl_hoursNoKey expiration window in hours from issuance (1 to 8760 hours = 1 year). Omit for non-expiring until revoked.
allowed_routesNoRoute allowlist patterns restricting which capabilities the delegated key may invoke (supports exact routes like "POST /kb/search" or prefix wildcards like "GET /reality/*"). Omit or pass [] to allow all hub capabilities.
max_order_centsNoMaximum USD cents allowed on any single capability call (e.g. 50 = $0.50). Omit for no per-call limit.
daily_budget_centsNoRolling UTC-day spend cap in USD cents (e.g. 500 = $5.00/day). Omit for no daily cap.
total_budget_centsNoLifetime cumulative spend cap in USD cents across the key lifespan (e.g. 2500 = $25.00 total). Omit for no lifetime cap.

Output Schema

NameRequiredDescriptionDefault
okYesTrue when the delegated key was minted.
key_roleNo
spend_keyNoOne-time plaintext delegated subagent spend key (sbk_*).
delegate_idNoDelegated key identifier (sbd_*) used for future updates or revocation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-idempotent, non-destructive write, and the description adds substantive context beyond them: the master-key auth requirement with the concrete failure mode (delegated keys receive HTTP 403), and the one-time secret disclosure with a persistence instruction tied to masked hints in x402_get_account. What is missing is the consequence of re-invoking (no idempotency key guidance despite idempotentHint=false), which would matter for retry safety.

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?

Three sentences, front-loaded with the action and scope, then the routing exclusions, then the auth and secret-handling caveats. Nothing is redundant with the schema and every clause carries decision-relevant information.

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 8-parameter mutating provisioning tool with an output schema and full annotation coverage, this is close to complete: auth, exclusions, and secret-handling are all covered. The only real gap is retry/idempotency behavior for a call flagged idempotentHint=false, which an agent would otherwise discover only by duplicating keys.

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% with per-field examples, formats, and ranges already documented, so this dimension sits at the baseline by rule. The description echoes the budget/route/expiry concepts at a high level but adds no syntax, unit, or default nuance beyond 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?

States a specific verb ('Mint') and a precisely characterized resource ('budget-capped, route-scoped, expiring delegated spend key (sbk_*)') scoped to subagents/workflows under a master Stripe account. The three qualifiers map directly onto the budget, route, and TTL knobs an agent must reason about, so it is distinguishable from every 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 an explicit positive condition ('provision least-privilege spending credentials for a new subagent') and two explicit negative routings with named alternatives: x402_update_delegate_key for limit changes and x402_revoke_delegate_key for disabling. No inference is required to pick this tool over its siblings.

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