Skip to main content
Glama

call_contract

Execute read-only smart contract calls to retrieve on-chain data like token balances and prices without gas costs or state changes.

Instructions

Execute a read-only call against a smart contract (eth_call). Returns the raw hex result. Does not cost gas or modify state. Useful for reading on-chain data like token balances, prices, positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idYesChain ID
toYesContract address
dataYesABI-encoded calldata (0x-prefixed hex)
Behavior4/5

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

With no annotations provided, the description carries the full burden and does an excellent job disclosing key behavioral traits: it explicitly states the operation is read-only, doesn't cost gas, doesn't modify state, and returns raw hex results. This covers safety, cost, and output format effectively.

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 perfectly front-loaded with the core functionality in the first sentence, followed by important behavioral details, and ends with a practical use case. Every sentence adds value with zero wasted words.

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 read-only tool with no annotations and no output schema, the description provides excellent context about behavior, safety, and use cases. The only minor gap is not explicitly mentioning potential error cases or limitations, but it's otherwise quite complete.

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 the schema already documents all three parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema descriptions, maintaining the baseline score of 3.

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 specific action ('execute a read-only call against a smart contract'), the resource ('smart contract'), and the method ('eth_call'). It distinguishes from sibling tools like 'send_transaction' or 'sign_transaction' by emphasizing read-only nature and no state modification.

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 context for when to use this tool ('useful for reading on-chain data like token balances, prices, positions') and implicitly distinguishes it from write operations. However, it doesn't explicitly name alternatives or specify when not to use it beyond the read-only emphasis.

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/hifriendbot/agentwallet-mcp'

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