Skip to main content

fetch

Sends an HTTP request with automatic SIWX authentication and payment handling. If the endpoint returns 402, AgentCash attempts SIWX first and only pays if the route still requires it. Equivalent to the MCP fetch tool. Output includes all headers from the final endpoint response in result metadata (or error details for an HTTP error). This preserves raw MPP payment-receipt and x402 payment-response / x-payment-response proof when the server supplies it.
Run check <url> first to confirm the request body schema. Skipping this often causes 400 errors from wrong field names.

Options

Example

fetch-auth

Deprecated alias for fetch. It uses the same unified flow and accepts the same options, but new integrations should call fetch directly.

check

Gets the input/output schema and auth mode (paid or SIWX) for an endpoint. Returns exact field names from the OpenAPI spec. Equivalent to the MCP check_endpoint_schema tool. Call this before fetch to avoid 400 errors from wrong field names.

Options

Example

discover

Lists available endpoints at an API origin with descriptions and auth modes (paid or SIWX). Works with any origin, not just registered ones. Equivalent to the MCP discover_api_endpoints tool.

Options

Example

Finds paid API services by natural-language query. Returns matching origins with endpoints and pricing. Use this to find an API before you know which origin to call. Equivalent to the MCP search tool.

Example

try

Fetches a new origin’s resources and returns a prompt guiding you through calling the first endpoint. Good for exploring an unfamiliar origin.

register

Registers an origin with AgentCash by discovering and indexing its endpoints.

Example