Skip to main content
Glama

evm_read_contract

Read-only

Call any function on an EVM contract to read its state, using an ABI label, JSON, or auto-resolution from Etherscan.

Instructions

Read contract state by function name. Provide abiLabel (from evm_register_abi), abiJson, or let the tool auto-resolve from Etherscan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoFunction arguments as strings
abiJsonNoOptional ABI JSON string
chainIdNoChain ID (defaults to runtime config)
abiLabelNoLabel of a registered ABI (from evm_register_abi)
functionNameYesFunction name to call
contractAddressYesContract address
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds useful behavioral context: it can auto-resolve ABI from Etherscan and accepts abiLabel or abiJson as alternatives. This discloses the external dependency on Etherscan and the flexibility of input methods, going beyond the annotations.

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?

The description is a single, well-structured sentence that front-loads the purpose ('Read contract state by function name') before detailing ABI options. Every word earns its place, with no repetition or 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?

For a simple read tool with full schema coverage and a readOnlyHint annotation, the description is adequately complete. It covers the core action and the main input variations. It could mention that the function must be a view/pure function, but this is implied by 'read' and the readOnlyHint annotation.

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 descriptions cover all parameters (100%), but the description adds semantic relationships: it explains that abiLabel, abiJson, and auto-resolution are three alternative ways to provide the ABI. This contextual linkage is not apparent from the schema alone, enhancing parameter understanding.

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's function: 'Read contract state by function name.' This is a specific verb+resource pattern that distinguishes it from write operations (evm_write_contract) and ABI-fetching tools (evm_get_contract_abi). The mention of ABI resolution methods further clarifies its scope.

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?

The description gives context on how to invoke the tool (provide abiLabel, abiJson, or auto-resolve from Etherscan) but does not explicitly state when to use it versus alternatives like evm_get_balance or evm_call. Usage is implied by the tool name and description, but no exclusions or alternative recommendations are provided.

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/Apegurus/web3agent'

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