Skip to main content
Glama

Simulate a transaction

simulate
Read-only

Run an eth_call from a wallet without sending it to estimate gas and return revert reasons; optionally fund the sender via state override for a dry run.

Instructions

Run a transaction with eth_call from a wallet and estimate its gas, without sending it. Returns ok, gasEstimate and the revert reason when it fails. fundEth gives the wallet enough ETH through a state override for a dry run.

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": {
      "from": "<from>",
      "to": "<to>",
      "data": "<data>"
    },
    "name": "simulate"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget contract.
dataYesCalldata (0x-prefixed hex).
fromYesSender to simulate from.
valueNomsg.value in wei.
fundEthNoOverride the sender's ETH balance for a dry run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description goes further by disclosing what comes back (ok, gasEstimate, revert reason) and explaining that fundEth works via a state override rather than a real balance change. It stops short of noting rate limits, chain coverage, or that state overrides make results non-representative of on-chain balance conditions.

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?

Three short sentences, front-loaded with the core action and its key constraint, then the return shape, then the one non-obvious parameter. No filler.

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?

With no output schema, the description carries the return-value burden and does so by naming ok, gasEstimate, and the revert reason. For a five-parameter read-only simulation it is nearly complete; only the preconditions (e.g. what happens when the target has no code or the RPC is unreachable) are left unstated.

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

Parameters3/5

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

Schema description coverage is 100%, so from/to/data/value are already documented and the baseline applies. The description adds a little on fundEth ('gives the wallet enough ETH through a state override for a dry run'), but it does not clarify units or semantics for value beyond what the schema's 'msg.value in wei' already provides.

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 — 'Run a transaction with eth_call ... and estimate its gas, without sending it' — which unambiguously separates it from build_swap (constructs a swap tx) and quote (price estimate only). The non-broadcast nature is stated up front.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the 'without sending it' phrasing and 'for a dry run' indicate this is a preflight check, but the description never says when to prefer this over quote or build_swap, nor any condition under which it should not be used.

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