wallet_call
Prepares and simulates a smart contract function call, resolving ABIs and coercing arguments, then returns a preparedTxId for execution with wallet_executePrepared.
Instructions
Prepare and simulate a contract function call.
Returns a preparedTxId that can be executed with wallet_executePrepared.
Features:
Automatic ABI lookup from Herd
Function overload resolution
AI-friendly type coercion (strings to addresses, etc.)
Simulation before execution
Examples:
{"contract": "0x...", "function": "claim", "chain": "base"}
{"contract": "0x...", "function": "withdraw(uint256)", "args": ["1000000"], "chain": "base"}
{"contract": "vitalik.eth", "function": "balanceOf", "args": ["0x..."], "chain": "ethereum"}Function name formats:
"claim"- Simple name (must be unambiguous)"withdraw(uint256)"- Full signature (for overloaded functions)
After simulation succeeds, use wallet_executePrepared with the returned preparedTxId.
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": {
"contract": "<contract>",
"function": "<function>"
},
"name": "wallet_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | Optional ABI override. If not provided, fetched from Herd. | |
| args | No | Function arguments in order. Strings will be coerced to appropriate types. | |
| chain | No | Chain to call on. Default: "base" | |
| value | No | ETH value to send (in wei). Default: "0" | |
| contract | Yes | Contract address (0x...), Clara name (e.g., "brian" for brian.claraid.eth), or ENS name (e.g., "vitalik.eth") | |
| function | Yes | Function name ("claim") or full signature ("withdraw(uint256)") |