{"ok":true,"protocol":"mcp-jsonrpc-http","protocolVersion":"2024-11-05","server":{"name":"ava","version":"0.5.0","description":"Ava: mandates, policy gates and verifiable receipts for AI agents that spend money. Testnet by default; live is fail-closed."},"transport":{"type":"http","endpoints":["/mcp","/v1/mcp"],"methods":{"list":"GET or POST tools/list","call":"POST tools/call"}},"tools":[{"name":"ava_copilot_turn","description":"Natural-language copilot turn: message → intent → plan → testnet quote. Example: Swap 10 USDC to SUI on sui with 50 bps slip. Returns actions with approve_execute + executionId. Optional agentId/agentCredential for KYA gate (fail closed on reject). Does NOT fill until ava_approve_execute.","inputSchema":{"type":"object","properties":{"message":{"type":"string"},"portal":{"type":"string"},"userId":{"type":"string"},"mode":{"type":"string","enum":["paper","live","testnet","mainnet"]},"agentId":{"type":"string","description":"Optional agent id; uses a default testnet-scoped KYA credential when full agentCredential is omitted."},"agentCredential":{"type":"object","description":"Optional ava.kya.agent-credential.v1 object for KYA evaluation."}},"required":["message"]}},{"name":"ava_approve_execute","description":"Human-in-the-loop approve: the one call that actually settles a plan from ava_copilot_turn. It is gated by the bound mandate's status and constraints and by server-side policy limits, and it CAN REFUSE (e.g. mandate paused/cancelled, a policy violation, a stale preview hash); a refusal means no funds moved and no success receipt was written, only a refusal record. Testnet mode settles against simulated balances and returns a receipt + before/after balances, never a real chain. Mainnet mode signs with the caller's own Turnkey wallet and submits for real where a venue is live, and fails closed everywhere else, so it never claims a fill it cannot show. Call ava_list_venues for which routes are live rather than assuming; that tool reads the same registry this one enforces, so it cannot drift from what will actually execute. NEVER call without explicit user confirmation of the previewed quote.","inputSchema":{"type":"object","properties":{"executionId":{"type":"string","description":"executionId from actions[].type === approve_execute on the prior copilot turn"},"userId":{"type":"string","description":"Same userId used on ava_copilot_turn / portfolio"},"portal":{"type":"string","description":"Portal slug matching the pending plan (e.g. sui)"},"mode":{"type":"string","enum":["paper","live"],"description":"Default testnet. Live is fail-closed without a submit path."},"previewHash":{"type":"string","description":"previewHash from ava_preview_tx. Binds the signature to the artifact the human reviewed; a stale hash fails before signing."}},"required":["executionId","userId","portal"]}},{"name":"ava_lend_execute","description":"Execute a REAL lend against one of your mandates on a route Ava has proven on mainnet: Morpho Blue on Base, or Aave v3 on Monad, BNB Chain and Avalanche. This is the only MCP tool that moves live capital. Two-phase by design: call it once WITHOUT previewHash to receive the exact artifact a human must approve plus its hash, show that to the human, then call again WITH that previewHash. Your call is never treated as the human's confirmation, because you are not the person whose money moves. Only a settlement verified against the venue's own on-chain event returns a txHash; anything else has no txHash field at all, so a draft can never be narrated as a fill.","inputSchema":{"type":"object","properties":{"mandateId":{"type":"string","description":"The mandate authorising this capital. Required: Ava will not choose which of the user's authorisations to spend. From ava_create_mandate or ava_list_mandates."},"op":{"type":"string","enum":["supply","withdraw"],"description":"Supply into the venue or withdraw from it. Defaults to supply."},"amount":{"type":"string","description":"Human decimal amount of the mandate's asset. Defaults to the mandate's full capital when omitted."},"previewHash":{"type":"string","description":"The hash returned by the first call, after a human approved that exact artifact. Omit on the first call."},"idempotencyKey":{"type":"string","description":"Your own key for this economic action. Supply the SAME key when retrying: a fresh key per attempt makes every retry look new, which is exactly what defeats single-flight protection."},"userId":{"type":"string"},"portal":{"type":"string"}},"required":["mandateId","userId"]}},{"name":"ava_portfolio","description":"Simulated testnet portfolio for a userId (same data as GET /v1/portfolio): seeded balances, fills, optional portal. Requires userId. Does not invent live chain balances.","inputSchema":{"type":"object","properties":{"portal":{"type":"string","description":"Portal slug (default base)"},"userId":{"type":"string","description":"Required user id (from POST /v1/users/session or x-ava-user-id)"}},"required":["userId"]}},{"name":"ava_session","description":"Create or resume a human/org identity (userId), the first call in the loop. One human can own many agent instances (Claude + Cursor + OpenClaw + Ava-hosted). Moves no money and provisions no wallet by itself; call once and reuse the returned userId on every other tool.","inputSchema":{"type":"object","properties":{"userId":{"type":"string","description":"Reuse existing userId if known"},"displayName":{"type":"string"}},"required":[]}},{"name":"ava_create_agent","description":"Register an agent instance under userId, before it has a wallet or a mandate. Mode A (multi-agent): agentId=byo-external + label (e.g. claude-workspace, cursor-arb) for a coding agent that already exists elsewhere. Mode B (hosted): agentId=defi-lend|defi-swap|defi-perp|portfolio hires an Ava-run agent. One userId may own many agent instances; this call alone never touches funds.","inputSchema":{"type":"object","properties":{"userId":{"type":"string"},"portal":{"type":"string"},"agentId":{"type":"string","description":"Catalog id e.g. byo-external, defi-lend, defi-swap, defi-perp, portfolio"},"label":{"type":"string","description":"Optional label to distinguish agents under one human (e.g. claude-workspace, cursor-home, openclaw-night)."}},"required":["userId","portal","agentId"]}},{"name":"ava_provision_wallet","description":"Provision a Turnkey-custodied wallet address for this userId, scoped to one chain family (evm | solana | sui). Requires ava_session first. Returns the address for funding and later signing; it does not fund the wallet and does not move any money. If Turnkey is not configured server-side, the wallet comes back with status pending_provision rather than a fabricated active address, and cannot sign or hold funds until it is active.","inputSchema":{"type":"object","properties":{"userId":{"type":"string"},"family":{"type":"string","enum":["evm","solana","sui"]}},"required":["userId","family"]}},{"name":"ava_preview_tx","description":"Pre-sign preview: build the exact venue artifact (CoW EIP-712 order or unsigned Solana transaction) for a pending plan against the provisioned Turnkey wallet, simulate it where supported, and return it UNSIGNED. Nothing is signed or submitted. Show the artifact to the human, then pass the returned previewHash to ava_approve_execute so the signature covers exactly what was reviewed.","inputSchema":{"type":"object","properties":{"executionId":{"type":"string","description":"executionId from the prior ava_copilot_turn approve_execute action"},"userId":{"type":"string"},"portal":{"type":"string","description":"Portal slug matching the pending plan"}},"required":["executionId","userId","portal"]}},{"name":"ava_plan_workflow","description":"Turn ONE natural-language DeFi request into the dependent actions it actually contains, across one chain or several. Example: \"Supply 300 USDC to Morpho on Base, bridge no more than 200 to Avalanche, then supply what arrives to Aave\" returns three legs with the third depending on the second and taking its amount from what the bridge actually delivered, not a plan-time guess. Same-chain works identically: \"swap 100 USDC to WETH on Base then supply the WETH to Aave\" records the swap OUTPUT token so the second leg is denominated in WETH. Plans nothing it cannot execute: a clause naming an unsupported operation, an unnamed venue, a zero or negative amount, or one amount split across venues comes back in `unsupported` with a reason rather than being guessed at. Signs nothing and moves nothing. Every leg reports `executable` so you can see what Ava could actually run today.","inputSchema":{"type":"object","properties":{"message":{"type":"string","description":"The user's request, verbatim. Do not pre-parse it."},"userId":{"type":"string"}},"required":["message","userId"]}},{"name":"ava_plan_standing","description":"Turn a request for REPEATED autonomous action into an envelope of bounds the user signs once. Use this instead of ava_plan_workflow when the request describes a cadence: \"every hour, rotate my USDC into the best yield on Base using Aave and Morpho, never move more than 200 per rotation, never exceed 1000 total, stop after 30 days\". Asking a human to approve each rotation would defeat the point, so the user authorizes LIMITS rather than a plan: allowed operations, venues, chains, per-move and cumulative caps, a minimum gain that stops the agent churning capital for fees, an expiry, and revocation. Every bound must come from the user: anything missing is returned in `missing` and the envelope is NOT signable until supplied. minGainBps is required from you because users say \"the best yield\" rather than a basis-point floor, and Ava must not choose how much of their money goes to gas. Returns the envelope unsigned; nothing is authorized until the user signs it.","inputSchema":{"type":"object","properties":{"message":{"type":"string","description":"The user's request, verbatim."},"minGainBps":{"type":"number","description":"Minimum improvement, in basis points, a rotation must beat to be worth its fees. Ask the user; do not invent it."},"userId":{"type":"string"}},"required":["message","userId"]}},{"name":"ava_create_mandate","description":"Create a capital mandate: the objective, capital and constraints an agent is allowed to act under, optionally scoped to an agentInstanceId. Example: \"Earn on 500 USDC on Base, max 5% drawdown\". Or pass structured capital {asset,amount,chain}. Creating a mandate moves no money by itself and is not yet signed by an external wallet: it is Ava's own record of what was asked for, not a user-authorised instruction a stranger can rely on. Every later ava_approve_execute run under this mandate is gated on its status (active/paused/cancelled) and constraints, and can refuse.","inputSchema":{"type":"object","properties":{"portal":{"type":"string"},"message":{"type":"string"},"capital":{"type":"object"},"objective":{"type":"string"},"constraints":{"type":"object"},"conditions":{"type":"array"},"userId":{"type":"string"},"name":{"type":"string"},"agentInstanceId":{"type":"string","description":"Optional: bind mandate to one agent under the user (BYO or hosted)"}},"required":["portal"]}},{"name":"ava_list_mandates","description":"List capital mandates for a userId (optional filter by agentInstanceId).","inputSchema":{"type":"object","properties":{"portal":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string"},"agentInstanceId":{"type":"string"}},"required":["userId"]}},{"name":"ava_eval_mandate","description":"Read-only: check a mandate's exit conditions against a market snapshot and record the result. Omit snapshot to pull a live CoinGecko price for the condition asset. Never executes and never moves money; ava_approve_execute is the only tool that does.","inputSchema":{"type":"object","properties":{"mandateId":{"type":"string"},"snapshot":{"type":"object"}},"required":["mandateId"]}},{"name":"ava_agent_record","description":"Read an agent's track record before delegating capital to it. Returns mandates held, executions attempted, refusals by typed code, and receipts with their proof standing. Distinguishes CLAIMED from PROVEN: receiptsProven counts only chain-confirmed receipts; unconfirmed receipts prove nothing. AP2-aligned (each receipt's ap2.reference is the hash of the closed mandate) so an AP2-aware verifier can check it. Owner-readable always; a stranger reads only if the owner opted the record public. Zero is zero, never a placeholder.","inputSchema":{"type":"object","properties":{"agentInstanceId":{"type":"string","description":"The agent to look up."},"userId":{"type":"string","description":"Caller identity (ava_session first). Owner sees the full record; others only a public one."}},"required":["agentInstanceId"]}},{"name":"ava_get_receipt","description":"Retrieve the receipt for a prior ava_approve_execute by executionId, the loop's final step. Returns the stored receipt plus its honest proof.standing: none (nothing submitted), unconfirmed (an identifier exists but nothing independent confirmed it), chain-confirmed (the declared chain returned the transaction and it matches what the receipt claims), or chain-contradicted (the chain disagrees with the receipt). A verified receiptHash does not by itself mean chain-confirmed; read proof.standing, not just verified. Owner-scoped: only the userId the receipt was produced for can read it by executionId; also returns a receiptHash-addressed verify URL a stranger can check with no credential.","inputSchema":{"type":"object","properties":{"executionId":{"type":"string","description":"executionId returned by ava_copilot_turn / ava_approve_execute."},"userId":{"type":"string","description":"Same userId that produced the execution. Required for headerless callers."}},"required":["executionId"]}}],"toolsets":{"default":["ava_session","ava_plan_workflow","ava_plan_standing","ava_copilot_turn","ava_create_agent","ava_provision_wallet","ava_create_mandate","ava_list_mandates","ava_eval_mandate","ava_preview_tx","ava_approve_execute","ava_lend_execute","ava_get_receipt","ava_agent_record","ava_portfolio"],"available":["discovery","automations","advisory","hire"],"requested":[],"unknown":[],"usage":"Default surface is the 11-tool capital loop. Add more with a query parameter on the URL you paste into your client config, e.g. \"/mcp?toolsets=discovery,advisory\" or \"/mcp?toolsets=all\". Unknown toolset names are ignored, not rejected. tools/call still accepts any tool by name regardless of this filter; it only narrows what tools/list advertises, which is what MCP clients use to budget how many tools to load."},"notes":["Paper mode is default. No live fill is claimed without a real submit path.","Adapters (CoW, Jupiter, Cetus) are internal; users speak natural language.","ava_get_price uses CoinGecko public API (no pro key). Fail-closed on errors.","ava_portfolio requires userId and reads simulated testnet balances (GET /v1/portfolio), not live chain balances.","Canonical agent loop: ava_session → ava_create_mandate → ava_copilot_turn → show quote → user confirms → ava_approve_execute → ava_get_receipt."],"requestId":"0dd70db1-6ef9-4311-ba5c-f5117b029268"}