Skip to main content
Glama

hedera_query_contract

Query a Hedera smart contract view function using eth_call without gas or keys. Provide ABI, functionName, and args for auto encode/decode, or raw dataHex.

Instructions

Read a contract view/pure function via Mirror Node eth_call (keyless, no gas). Pass { abi, functionName, args } for auto encode/decode, or raw dataHex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiNoContract ABI (JSON array) — enables auto encode/decode
argsNoFunction arguments (used with abi)
dataHexNoFallback: ABI-encoded calldata as 0x-prefixed hex
fromAddressNoOptional 0x caller address
functionNameNoFunction name to call (used with abi)
contractIdOrAddressYesContract id (0.0.x) or 0x EVM address
Behavior4/5

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

The description explains that the call is keyless, uses Mirror Node, and costs no gas, which is helpful. It also outlines the two invocation modes. Without annotations, this adds meaningful behavioral context beyond the schema, though it does not describe error handling or output format.

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 two sentences with no filler. It front-loads the core purpose and then lists the two input modes efficiently. Every word earns its place.

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?

With no output schema, the description does not explain the return value format (e.g., decoded result or raw hex). It adequately covers the input modes but lacks information about what the agent can expect after a successful call, leaving a gap for a read operation.

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 is 3. The description adds value by grouping abi, functionName, args as one method ('auto encode/decode') and dataHex as fallback, clarifying the interplay between parameters beyond their individual schema descriptions.

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 it reads a contract view/pure function via Mirror Node eth_call, distinguishing it from state-changing contract tools like hedera_execute_contract. The verb 'Read' and specification of 'view/pure function' make the purpose unambiguous.

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 two clear usage patterns: using abi+functionName+args for auto encode/decode, or raw dataHex. It implies read-only usage via 'view/pure function' and 'keyless, no gas', but does not explicitly exclude state-changing calls or compare to siblings like hedera_execute_contract.

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/ExpertVagabond/hedera-mcp'

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