Skip to main content
Glama

Trace EVM Call

evm_trace_call
Read-onlyIdempotent

Trace a read-only EVM call to see internal calls, gas costs, events, and revert reasons without submitting a transaction.

Instructions

Execute a read-only call with cast call --trace and return the structured call tree: every internal call, its gas cost, call type, return values, emitted events, and revert frames.

Use this to verify exploit reachability, inspect cross-contract call flows, or debug unexpected reverts. This tool does NOT submit a real transaction.

Args:

  • target (string): Target contract address (0x-prefixed, 42 chars)

  • signature (string): Function signature, e.g. "withdraw(uint256)"

  • args (string, optional): Space-separated arguments for the function call

  • rpcUrl (string): JSON-RPC endpoint URL (e.g. http://localhost:8545)

Returns: JSON object: { "reverted": boolean, // true if any frame reverted "gasUsed": number, // Total gas used (when reported) "events": [ { "depth": number, // Nesting depth in the call tree (0 = top frame) "kind": string, // "call" | "return" | "stop" | "revert" | "emit" "gas": number, // Gas for call frames "target": string, // Callee address or label "call": string, // Function + arguments "callType": string, // "staticcall" | "delegatecall" | undefined (regular call) "value": string // Return data, revert reason, or event payload } ] }

Examples:

  • "Why does withdraw() revert?" → trace it, read the deepest revert frame

  • "Does transfer() call an external contract?" → look for depth > 0 call events

Error Handling:

  • Returns isError=true if cast is not installed, the RPC is unreachable, or no trace was produced

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoSpace-separated arguments for the function call
rpcUrlYesJSON-RPC endpoint URL
targetYesTarget contract address (0x-prefixed, 42 chars)
signatureYesFunction signature, e.g. 'withdraw(uint256)'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventsYes
gasUsedNo
revertedYes
Behavior5/5

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

Annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint) are fully supported and augmented by the description. The description adds specific behavioral details: it uses 'cast call --trace', returns structured call tree including internal calls, gas cost, events, revert frames, and explicitly states it is read-only. Error handling (cast not installed, RPC unreachable) is also disclosed, providing comprehensive transparency beyond annotations.

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?

The description is well-structured: summary, use cases, explicit Args/Returns/Examples/Error Handling sections. It is appropriately sized for the tool's complexity and front-loads the key information. Minor redundancy (e.g., repeating schema descriptions) prevents a perfect 5, but overall it is concise and easy to scan.

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?

Given the presence of a full output schema (embedded in description), comprehensive annotations, and 100% schema coverage for parameters, the description is complete. It covers return structure, error handling, usage examples, and behavioral constraints. No gaps remain for an agent to invoke this tool correctly.

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?

Input schema coverage is 100% with clear descriptions for all 4 parameters. The description's 'Args' section repeats this information without adding significant new semantics. For example, 'args' is described as 'optional' and 'Space-separated arguments' which matches the schema. Since the schema already provides adequate meaning, the description adds minimal additional value.

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 executes a read-only call with 'cast call --trace' and returns a structured call tree. It explicitly distinguishes from mutable tools by stating 'This tool does NOT submit a real transaction.' Use cases like verifying exploit reachability further clarify its purpose and differentiate it from siblings like 'evm_simulate_transaction'.

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?

The description provides clear usage guidance: 'Use this to verify exploit reachability, inspect cross-contract call flows, or debug unexpected reverts.' It also explicitly states when not to use for real transactions. However, it does not directly name alternative sibling tools for related tasks (e.g., gas profiling via 'evm_analyze_gas_profile'), which would elevate it to a 5.

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/0xendale/evm-agent-toolkit'

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