Skip to main content
Glama

Call a view function

zenith_read_contract
Read-only

Call a smart contract function without sending a transaction by providing an EVM address, function name or signature, and arguments; verified ABIs and argument type conversion are handled.

Instructions

Calls a contract function without sending a transaction. Give either a full signature (e.g. "balanceOf(address) view returns (uint256)") or just the function name if the contract is verified on the explorer (ERC-20 names work for any token). Arguments are converted to the right types.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>",
      "function": "<function>"
    },
    "name": "zenith_read_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
abiNoOptional JSON ABI to use instead of the verified one
argsNoArguments in order; integers may be strings
addressYesEVM address (0x…)
functionYesFunction name, or a signature with return types
blockNumberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds real behavioral context beyond that: no transaction is broadcast, a verified ABI is a prerequisite for the bare-name shortcut, and arguments are coerced to the declared types. It does not mention rate limits, error behavior, or what a returned value looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Three short sentences, front-loaded with the core behavior and followed by the function-identification rule and a type-coercion note. Every sentence carries information; only the parenthetical ERC-20 example borders on redundant with the verified-explorer clause.

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?

There is no output schema, so the description is the only place an agent could learn the response shape, and it says nothing about what a call returns or how decoded values are presented. For a 5-parameter read tool with an ABI-resolution dependency, that leaves a noticeable gap despite otherwise solid coverage.

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 coverage is 80%, so the schema already documents abi, args, address and function, which sets the baseline at 3. The description reinforces the function-format choice and the argument coercion rule, but adds nothing about blockNumber (historical reads) or the ABI override, so it does not meaningfully exceed the schema.

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?

"Calls a contract function without sending a transaction" names a specific verb and resource and immediately separates this read path from the write path (zenith_send). An agent can classify the tool as a read-only eth_call-style invocation without opening the schema.

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 sets clear context for when this tool applies (read the chain, do not mutate) and explains the two accepted ways to identify a function: full signature, or bare name when the contract is verified or is an ERC-20. It stops short of naming an explicit alternative for write operations or stating exclusions, so it falls just short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.