Skip to main content
Glama

simulate_transaction

Read-onlyIdempotent

Simulate a transaction over the chain RPC to verify contract call behavior, check for success or revert, and test state-dependent interactions before signing or broadcasting.

Instructions

Run an eth_call against the chain's RPC to simulate a transaction without signing or broadcasting it. Returns { ok, returnData?, revertReason? }. Use this BEFORE prepare_*/send_transaction to verify a contract call does what you expect — e.g. does wrapping ETH by sending to WETH9's fallback succeed, does a custom calldata revert, what selector gets hit. For state-dependent calls (WETH deposit credits msg.sender, ERC-20 transfer debits msg.sender), pass the user's wallet as from. Prepared transactions are also re-simulated automatically at send_transaction time — this tool lets the agent check ahead. NEVER call this on a tx that depends on an approval you just submitted but haven't yet waited on: the approval must be included on-chain (poll get_transaction_status until confirmed) before the dependent tx will simulate correctly — otherwise you get a misleading 'insufficient allowance' revert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoethereum
fromNomsg.sender to simulate from. Omit for a state-independent call; include the user's wallet when the target contract's behavior depends on the caller (e.g. WETH9.deposit credits msg.sender, ERC-20 transfer debits msg.sender).
toYes
dataNoHex-encoded calldata. Omit for a plain value transfer.
valueNoValue to send with the call, in wei as a decimal string. Omit for 0. Example: "500000000000000000" for 0.5 ETH.
Behavior5/5

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

Adds significant detail beyond annotations: no signing/broadcasting, return format includes {ok, returnData?, revertReason?}, and explains state-dependent behavior (msg.sender) and need for approval confirmation. Annotations already declare readOnlyHint, so no contradiction.

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

Conciseness5/5

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

Every sentence serves a purpose: definition, return, use case, examples, and warnings. No redundancy, well-structured with logical flow from what to when and how not to use.

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

Completeness5/5

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

Despite no output schema, the description fully explains the return format. Covers prerequisites (approval confirmation), state-dependency, and usage context. Comprehensive for a simulation tool with behavioral nuances.

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 60% (from, data, value have descriptions; chain and to lack). The description compensates by explaining the purpose of 'from' for state-dependent calls and 'data'/'value' formats, but does not add detail for 'chain' or 'to' beyond schema. Overall adds value but not perfectly comprehensive.

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?

The description clearly states the tool simulates an eth_call without signing/broadcasting, returns a structured object, and distinguishes from prepare_*/send_transaction tools. Examples like WETH wrapping and custom calldata reinforce the specific verb and resource.

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

Usage Guidelines5/5

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

Explicit guidance to use before prepare_*/send_transaction to verify contract calls. Specifically warns against calling after an unconfirmed approval, providing a clear 'when not to use' scenario. Implicitly contrasts with send_transaction for actual execution.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/recon-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server