Skip to main content
Glama

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

NameRequiredDescriptionDefault
abiNoOptional ABI override. If not provided, fetched from Herd.
argsNoFunction arguments in order. Strings will be coerced to appropriate types.
chainNoChain to call on. Default: "base"
valueNoETH value to send (in wei). Default: "0"
contractYesContract address (0x...), Clara name (e.g., "brian" for brian.claraid.eth), or ENS name (e.g., "vitalik.eth")
functionYesFunction name ("claim") or full signature ("withdraw(uint256)")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does substantial work: it discloses automatic ABI lookup from Herd, overload resolution, string-to-type coercion, and that simulation happens before execution — implying this call does not broadcast. It omits what happens when simulation fails or what permissions/authentication are needed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-sentence purpose and the returned identifier, then layered into features, examples, and function-name formats. The examples and format section earn their place, though the markdown bullet/heading scaffolding is slightly heavier than needed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter, 100%-covered schema with no output schema, the description covers the return value (preparedTxId), the follow-up call, and the name-format rules. It leaves error/failure behavior and any auth or chain-specific constraints unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description adds meaning beyond the schema by explaining that a bare function name must be unambiguous and that full signatures are required for overloads, plus worked examples showing args ordering and chain usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Prepare and simulate a contract function call') and the description clearly positions it as a preparation step whose output is fed to wallet_executePrepared, distinguishing it from that sibling's execution role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the workflow after simulation succeeds ('use wallet_executePrepared with the returned preparedTxId') and provides three concrete invocation examples plus guidance on simple vs. full-signature function names. It stops short of explicit exclusions, e.g. when to prefer wallet_send over a direct contract call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.