Call Tool

Main endpoint — call a paid MCP tool.

Supports two payment paths: Stellar — X-Payment: tx_hash=<hash>,from=<addr>,id=<payment_id> Base — PAYMENT-SIGNATURE: <base64(PaymentPayload JSON)>

Flow:

  1. Neither header → _issue_402 (advertise both options) — the body is parsed leniently first: a bare/malformed POST still gets the 402, never a 422.
  2. X-Payment → _settle_stellar, then _execute_and_log
  3. PAYMENT-SIGNATURE + $0 tool → _settle_free_v2 (no on-chain settle)
  4. PAYMENT-SIGNATURE → _settle_base_path, then _execute_and_log (2–4 validate the body strictly before settling, so a malformed paid call 422s without burning the payment.)
post/tools/{tool_name}/call

Request

  • Base URL: https://agentpay.tools (the document declares no server; this is the origin it was published from)
  • URL: https://agentpay.tools/tools/{tool_name}/call
  • Auth: none required

Path parameters

tool_namestring required

Headers

x-paymentstring nullable
x-agent-addressstring nullable
payment-signaturestring nullable

Request body

parametersobject
agent_addressstring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.