Skip to main content
Glama

Simulate a transaction

simulate_transaction
Read-onlyIdempotent

Dry-runs one prepared transaction from a wallet against the latest block and explains the failure in plain language if it would revert. Steps that depend on an earlier approval only pass after that approval is mined.

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

Input Schema

NameRequiredDescriptionDefault
toYesThe step's to address, as returned by a build_ tool
dataYesThe step's calldata, as returned by a build_ tool
fromYesWallet that would send the transaction
valueNoNative value in wei. Always 0 for Based Loans calls

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / data / description
      Added value: +"The step's calldata, as returned by a build_ tool"
    • removedInput schema / properties / from / $ref
      Removed value: -"#/properties/to"
    • addedInput schema / properties / from / description
      Added value: +"Wallet that would send the transaction"
    • addedInput schema / properties / from / pattern
      Added value: +"^0x[0-9a-fA-F]{40}$"
    • addedInput schema / properties / from / type
      Added value: +"string"
    • addedInput schema / properties / to / description
      Added value: +"The step's to address, as returned by a build_ tool"
    • addedInput schema / properties / value / description
      Added value: +"Native value in wei. Always 0 for Based Loans calls"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false), so the description earns credit for what it adds: simulation runs against the latest block, reverts are explained in plain language, and the approval-mining caveat warns that dependent steps can falsely fail. It does not say what a successful simulation returns, but most behavior is disclosed.

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?

Two sentences, front-loaded with the core action, with no filler. The approval caveat is a separate sentence that carries distinct operational value.

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 usefully says failures come back as plain-language explanations and that state is read at the latest block. It leaves the success-path response shape unstated, which is a minor gap for a simple four-parameter simulation tool.

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 each of the four parameters is already documented, including that 'to' and 'data' come from a build_ tool and that value is always 0 for Based Loans calls. The description adds only the framing that exactly one transaction is simulated, not any parameter-level meaning beyond the schema.

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

Purpose4/5

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

The description states a specific verb and resource: dry-run/simulate exactly one prepared transaction from a wallet against the latest block. That clearly separates it from the build_* siblings that construct the transaction and from get_* readers, though the differentiation is implied rather than naming a sibling.

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: 'one prepared transaction' plus the schema note that inputs come from a build_ tool tells an agent this is the post-build, pre-send check. The approval-ordering sentence is a genuine usage precondition, but there is no explicit when-to-use, when-not-to-use, or named alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.