request_purchase

View as .md
tools/call
{  "name": "request_purchase",  "arguments": {    "service_id": "svc_01jd2x3k4m5n6p7q8r9s0t1v2w",    "task_id": "weekly-report-42",    "idempotency_key": "weekly-report-42-forecast"  }}

Buy one paid resource by service_id or url. The gateway checks your spending rules, pays, and returns the resource. Use a new idempotency_key per purchase; reuse it to retry the same purchase. Never retry a denial.

MCP serverstdio · streamable-http at https://api.52-28-238-205.sslip.io/mcp with Authorization: Bearer YOUR_AGENT_KEY (an agent credential)
TOOLrequest_purchase
Matching REST operationCreate payment intent
POST /v1/payment-intents runs the same action over HTTP, under the same policy.

Input

service_idstringoptional

exactly one of service_id, url

urlstringoptional
task_idstringrequired
idempotency_keystringrequired
inputobjectoptional
purposestringoptional

max 500

wait_secondsintegeroptional

default 20, max 60

Errors

Business failures return an error result whose text is JSON: {error_code, reason_code, message, retryable, next_action}. Malformed arguments use protocol errors. Every reason code is in the reason code reference.

ABOVE_AUTO_THRESHOLDdo not retry

Poll status.

UNKNOWN_MERCHANT_LIMITdo not retry

Poll status.

HARD_CAP_EXCEEDEDdo not retry

Choose a cheaper service or ask the owner to change the mandate. Do not retry this purchase.

BUDGET_EXCEEDEDdo not retry

Call get_spending_status.

NO_FUNDED_CHAINdo not retry

Ask the owner to fund a spending wallet.

MANDATE_EXPIREDdo not retry

Stop.

KILL_SWITCH_ACTIVEretry later

Stop; retry later.