Skip to main content
Glama

Quantum Atlas Stripe X402 Agent Payment Hub

Quote X402 Capability Plan

x402_quote_plan
Read-onlyIdempotent

Calculate exact USD cost for 1 to 25 HTTP 402 capabilities and evaluate whether a Stripe spend key can auto-execute within balance, per-call caps, daily/total budgets, and route allowlists. Use this before x402_execute_capability to verify total cost and detect when x402_request_approval or x402_create_checkout is needed; do not use this to browse available tools (use x402_list_capabilities) or run a paid capability (use x402_execute_capability). Free and read-only (never charges credit); returns payment_assistant.human_approval_required=true and recommended Stripe pack amounts when funds or policy caps block execution. Subject to 120 req/min/IP rate limiting.

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": {
      "items": "<items>"
    },
    "name": "x402_quote_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesOrdered list of 1 to 25 capability line items to price and policy-check together.
spend_keyNoStripe-funded master or delegated subagent spend key (format: sbk_<43+ chars>). Optional when the caller supplies the x-atlas-spend-key HTTP header.

Output Schema

NameRequiredDescriptionDefault
okYesTrue when all items were quoted successfully.
chargedNoAlways false because quoting never debits funds.
total_usdNoFormatted total combined cost in USD (e.g. "0.40").
total_centsNoTotal combined cost in USD cents across all quoted items.
payment_assistantNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The annotations already declare readOnlyHint and idempotentHint, but the description adds the cost profile ("Free and read-only (never charges credit)"), the failure signal returned (human_approval_required=true with recommended pack amounts), and a concrete 120 req/min/IP rate limit. That is meaningful context beyond the structured fields, though it stops short of describing the shape of the cost breakdown itself.

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 core action and scoped in three dense sentences with no filler; every clause carries routing or behavioral information. It is on the heavy side as a single paragraph and would scan better as separated clauses, but nothing is redundant.

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 two-parameter, free, read-only quote tool with a published output schema, this covers purpose, sequencing, policy semantics, cost-to-caller, and rate limits. An agent has everything needed to call it at the right moment and interpret the approval flag.

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 description coverage is 100%, so the baseline is 3; the description earns above that by explaining what the spend_key actually gates — balance, per-call caps, daily/total budgets, and route allowlists — which the schema only hints at. It also frames the items list as a pricing/policy unit, reinforcing the 1-to-25 bound.

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 definition opens with a specific verb and resource: "Calculate exact USD cost for 1 to 25 HTTP 402 capabilities," then adds the second function (policy eligibility for a Stripe spend key). It explicitly separates itself from x402_list_capabilities and x402_execute_capability, so an agent can route correctly 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?

It states the sequencing rule ("Use this before x402_execute_capability"), the conditional outcome that selects other tools (when x402_request_approval or x402_create_checkout is needed), and negative guidance for two named siblings. This is explicit when/when-not/alternatives coverage.

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