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:
- Neither header → _issue_402 (advertise both options) — the body is parsed leniently first: a bare/malformed POST still gets the 402, never a 422.
- X-Payment → _settle_stellar, then _execute_and_log
- PAYMENT-SIGNATURE + $0 tool → _settle_free_v2 (no on-chain settle)
- 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
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 1 revision of this API.