Skip to main content
Glama

Crypto, web, finance and app data tools

Read Contract

read_contract

Call any read-only contract function without a transaction or ABI file: give the signature with return types, e.g. balanceOf(address)(uint256) or getReserves()(uint112,uint112,uint32), plus arguments; returns decoded values.

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>",
      "signature": "<signature>"
    },
    "name": "read_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
blockNolatest
chainNoethereum
addressYes
signatureYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden but does add important behavior: it is read-only, requires no transaction or ABI file, and returns decoded values. It does not disclose chain support limits, block semantics, authentication/rate-limit behavior, or error conditions.

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 front-loaded sentence with no wasted text. The examples earn their place by clarifying the non-obvious signature format.

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

Completeness5/5

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

Has an output schema with decoded values, so the description needn't explain return values. However, it leaves chain/block/address parameter semantics and sibling-tool routing implicit, which is incomplete for a 5-parameter unannotated tool.

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 0%, so the description must compensate. It adds valuable meaning for the signature parameter by showing return-type syntax and examples, and mentions arguments, but it does not explain address, chain, or block parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: call a read-only contract function. It also clarifies that no transaction or ABI file is needed and gives concrete signature examples, though it does not explicitly distinguish this generic tool from specialized siblings like erc20_balance or contract_info.

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 phrase 'without a transaction or ABI file' implies when this tool is appropriate, but the description gives no explicit when-to-use/when-not-to-use guidance or alternatives. An agent must infer that this is for generic read-only contract calls rather than specialized sibling tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources