Skip to content

MCP tools

The AGENSAI MCP server exposes the following tools. Every tool input takes ENS names where addresses are expected. Every tool output returns ENS names where addresses would otherwise be hex.

ToolPurpose
list_agentsEnumerate every agent under your API key.
get_agentInspect a single agent by ENS name.
create_agentProvision a new named agent with policies.
transferSend tokens from an agent to a recipient.
read_contractRead a view function on any contract.
executeCall a non-view contract method as an agent.
revokePermanently revoke an agent.
resolveResolve an ENS name to an address (debug helper).

Example: create_agent

The model passes:

{
  "name": "my-agent",
  "policies": [
    { "type": "spend", "token": "USDC", "amount": 50, "period": "weekly" },
    { "type": "contract", "whitelist": ["uniswap.eth"] }
  ]
}

The server replies:

{
  "name": "my-agent.agensai.eth",
  "address": "0x7a3b…c2f1",
  "chainId": 8453,
  "status": "active"
}

Safety

The MCP server respects every onchain policy. The model cannot bypass a spend cap or contract whitelist by phrasing a request differently — the smart account itself rejects the underlying transaction.

Errors

Tools surface errors as MCP error responses with stable codes:

CodeMeaning
unauthenticatedAPI key missing or invalid
policy_violationTransaction would exceed an active policy
not_foundAgent or contract not found
networkUpstream RPC unreachable