Get data through CoPay (paid, x402)
copay_fetchFetch a CoPay resource and pay its shared price with x402 over MCP. Called without payment it returns the x402 PaymentRequired (isError, structuredContent = {x402Version, accepts, ...}); pay one "exact" option and call again with the PaymentPayload in _meta["x402/payment"]. x402 MCP clients (@x402/mcp) do this automatically. If you already paid for this response, it is served free and the payment is not settled. If the upstream fails, you are not charged.
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": {
"resource": "<resource>"
},
"name": "copay_fetch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON body for POST resources | |
| rail | No | Payment rail id or CAIP-2 network (default: any CoPay accepts). | |
| params | No | Query/path parameters, e.g. {"asset":"BTC"} | |
| resource | Yes | Resource id from copay_catalog | |
| maxPriceUsd | No | Most you will pay in USD, e.g. "0.05". | |
| maxAgeSeconds | No | Oldest response you accept, in seconds. Larger = more reuse = cheaper. |