azeth_smart_pay
Discovers the best service for a capability, pays automatically, and falls back to alternatives if the best one fails. Returns data and payment details.
Instructions
Discover the best service for a capability and pay for it automatically.
Use this when: You need a service by CAPABILITY (e.g., "price-feed", "market-data", "translation") and want Azeth to pick the highest-reputation provider, handle payment, and fall back to alternatives if needed.
How it differs from azeth_pay:
azeth_smart_pay: "I need price-feed data" → Azeth discovers the best service, pays it, returns the data.
azeth_pay: "I need data from https://specific-service.com/api" → You know which service, Azeth pays it.
Flow: Discovers services ranked by reputation → tries the best one → if it fails, tries the next. Set autoFeedback: true to automatically submit a reputation opinion based on service quality after payment. Note: autoFeedback defaults to false in MCP context (ephemeral client). Enable it if the MCP server has a bundler configured.
INTENT (recommended): pass intent (loose token(s)) or params (exact) to get exactly the asset/resource you want. Azeth matches your intent deterministically (no LLM, low latency): for a provider that exposes a CATALOG of many paid endpoints (e.g. price of BTC, ETH, XRP) it navigates to the right priced route; for a provider with a single fixed priced route it pays only when the asset you named appears in that route. SAFETY GUARANTEE: with an intent set, smart_pay NEVER spends on a non-matching asset — on a miss it returns { paid:false, resolved:false, options:[…] } (the catalog menu + valid param values), so you refine and retry in one shot with no money spent on the wrong thing.
Returns: The response data, which service was used, attempts, payment details, and (for catalog navigation) a resolved receipt of the entry + bound params.
Example: { "capability": "price-feed", "intent": "bitcoin" } → pays the BTC price route and returns the data. Example: { "capability": "price-feed", "params": { "coinId": "ethereum" } } or { "capability": "translation", "maxAmount": "0.50", "method": "POST", "body": "{"text": "hello"}" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet"). | |
| capability | Yes | Service capability to discover (e.g., "price-feed", "market-data", "translation", "compute"). | |
| intent | No | What you want, as loose token(s) (e.g. "bitcoin", or ["bitcoin","fresh"]). When the chosen provider serves a catalog of paid endpoints, these are matched deterministically against the catalog's param values to pick the concrete route. On a miss, the response returns the catalog "options" so you can retry with an exact value. | |
| params | No | Precise catalog params (e.g. { "coinId": "bitcoin" }) — overrides intent. Use when you already know the provider's param names (e.g. from a prior "options" response). | |
| method | No | HTTP method. Defaults to "GET". | |
| body | No | Request body for POST/PUT/PATCH requests (JSON string, max 100KB). | |
| maxAmount | No | Maximum USDC amount willing to pay per service (e.g., "1.00"). Rejects if service costs more. | |
| minReputation | No | Minimum reputation score (0-100) to consider. Services below this are excluded. | |
| autoFeedback | No | Automatically submit a reputation opinion after payment based on service quality. Defaults to false. | |
| smartAccount | No | Smart account to pay from. Use "#1", "#2", etc. (index from azeth_accounts) or a full address. Defaults to your first smart account. |