Skip to main content
Glama

コントラクトの読み取り関数を呼ぶ

call_contract
Read-only

Execute view/pure functions on any Ethereum contract using eth_call. Returns ABI-decoded values without modifying state or consuming gas.

Instructions

任意のコントラクトの view / pure 関数を eth_call で呼ぶ。関数署名から keccak256 でセレクタを計算し、引数を ABI エンコードして送り、戻り値をデコードして返す。状態は変わらず、ガスもかからない。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo引数の配列。署名の型と同じ順・同じ個数
blockNoこの時点の状態で呼ぶ。既定は latest
addressYesコントラクトアドレス
networkNo対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet
outputsNo戻り値の型。例: ["uint256"] / ["string"]。省略すると生の 16 進のまま返す
signatureYes関数署名。例: "balanceOf(address)" / "totalSupply()"
Behavior4/5

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

Beyond the annotations (readOnlyHint, destructiveHint false), the description adds transparency about the internal process: keccak256 selector calculation, ABI encoding, and decoding of return values. It clarifies the read-only nature and no-gas behavior, which is consistent with 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 concise (two sentences) and front-loaded with the main action. It conveys the necessary information without redundancy, making it well-structured and easy to parse.

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?

The description covers the essential aspects: purpose, process, and outcome. It lacks explicit mention of error handling or return value details, but given the schema richness and simplicity of the tool, it is sufficiently complete for a typical use case.

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?

The schema already provides full coverage of all parameters with descriptions. The description adds context to the overall flow but does not provide additional per-parameter semantics beyond what is in the schema. Baseline 3 is appropriate given high schema coverage.

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 purpose: calling view/pure functions via eth_call, with explicit mention of selector computation and ABI encoding. It is distinct from sibling tools that read transactions, blocks, or tokens.

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 implies usage for read-only queries ('view/pure', 'no state change, no gas') but does not explicitly contrast with alternatives or state when to prefer this tool over others. Guidance is implicit rather than explicit.

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/nakamura196/chain-reader-mcp'

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