Skip to main content
Glama

Read a smart contract

read-contract
Read-only

Call any read-only smart contract method using human-readable ABI signatures or auto-fetched verified ABIs. Specify chain, address, method, and optional arguments.

Instructions

Call a read-only (view/pure) contract method. Provide abi as human-readable signatures (e.g. ["function balanceOf(address) view returns (uint256)"]) for zero-config use, or set ETHERSCAN_API_KEY to auto-fetch verified ABIs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiNoOptional ABI: a signature string, array of signatures, or JSON ABI.
argsNoArguments for the method, in order.
methodYesMethod name to call, e.g. "balanceOf".
addressYesContract address.
chainIdYesChain id, e.g. "1".
Behavior4/5

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

Annotations already provide readOnlyHint and openWorldHint. Description adds behavioral context: calls view/pure methods, details ABI handling (zero-config or auto-fetch). No contradictions. Adequate 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.

Conciseness5/5

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

Two concise sentences; first sentence states core purpose, second explains ABI configuration. No unnecessary words, front-loaded with key information.

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?

Given no output schema and generic nature of the tool, the description sufficiently covers how to invoke it. Mentions zero-config and Etherscan integration. Could optionally mention return format, but not critical.

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 100%, so baseline 3. Description adds specific meaning for the abi parameter (how to provide signatures or use Etherscan), going beyond the schema's generic 'Optional ABI' description.

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 calls read-only (view/pure) contract methods, with specific verb and resource ('call a... contract method'), and distinguishes from sibling tools like prepare-transaction by emphasizing read-only.

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?

Provides clear context for when to use (calling read-only methods) and explains ABI provision options (human-readable signatures or Etherscan). Implicitly excludes state-changing methods, but no explicit when-not-to-use statement.

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/zhangzhongnan928/mcp-blockchain-server'

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