Skip to main content
Glama

read_contract

Read data from any EVM smart contract by calling view or pure functions. Supply the contract address, ABI, and function name to get balances, prices, and more across networks.

Instructions

Read data from a smart contract by calling a view/pure function

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiYesThe ABI of the smart contract function, as a JSON array
argsNoThe arguments to pass to the function
networkNoNetwork name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet.bsc
functionNameYesThe name of the function to call on the contract
contractAddressYesThe address of the smart contract to interact with
Behavior3/5

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

Without annotations, the description carries the burden. It discloses that the function must be view/pure, implying read-only and no state change, which is useful. However, it does not mention gas costs, possible reverts, error handling, or return value structure.

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, concise sentence with no redundant words. It is front-loaded with the key action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 5 parameters and no output schema, yet the description gives no information about return values, network behavior, or error conditions. It is minimally adequate for a simple read operation but lacks the richer context an agent would benefit from.

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 all parameters are documented in the schema. The description adds no additional parameter-level details, just the overall function type, which meets the baseline but does not exceed it.

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 reads data from a smart contract via a view/pure function, which is specific and distinguishes it from write_contract. The verb 'read' and resource 'smart contract' are immediately clear.

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?

It is implied that this tool is for reading contract state, but no explicit when-to-use or exclusions are given. The sibling tool write_contract exists, but the description does not name it or any alternative, leaving usage determination to the agent.

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/nirholas/universal-crypto-mcp'

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