Skip to main content
Glama

Eth Read Contract

eth_read_contract
Read-onlyIdempotent

Read-only (eth_call) against any Ethereum contract, executed by our ETH RPC (external RPC). ERC-20 helpers balanceOf / allowance / decimals / symbol / name / totalSupply are built in; any other function can be called by passing its 4-byte selector plus ABI-encoded parameter. Nothing is signed or written. When to use: an agent needs an on-chain value without trusting a third-party API - a USDT/USDC balance, token decimals, an allowance, or any view function. Do not use: to send a transaction (this never writes), or for a historical balance. Returns: ok, contract, function, selector, output_type, value, value_human for known-decimals tokens.

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": {
      "contract": "<contract>",
      "function": "<function>"
    },
    "name": "eth_read_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
argumentNoEthereum address argument (balanceOf / allowance)
contractYes0x + 40 hex contract address
functionYesbalanceOf | allowance | decimals | symbol | name | totalSupply, or a label for a raw selector
selectorNoExplicit 4-byte selector hex for non-ERC-20 calls
argument2NoSecond address argument (allowance)
parameterNoABI-encoded parameter hex (with an explicit selector)
output_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered structurally. The description adds genuinely new context: execution goes through an external ETH RPC, nothing is signed or written, and the raw-selector escape hatch exists for non-ERC-20 functions. It does not discuss rate limits or RPC failure behavior, so it stops short of a 5.

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?

Front-loads the mechanism, then usage, then exclusions, then return shape — a sensible order with no filler. The semicolon-chained ERC-20 list and the 'Returns:' enumeration make sentences dense, but since there is no output schema the return listing earns its space.

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?

For a 7-parameter, no-output-schema tool, the description covers mechanism, chain scope, usage boundaries, the raw-call escape hatch, and the return fields. An agent has enough to call it correctly without opening anything else.

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 86%, so the baseline is 3, and the description earns above that by explaining the pairing rule: `selector` must be supplied together with ABI-encoded `parameter` for arbitrary functions, while the ERC-20 path uses named functions. It does not clarify the `argument` vs `argument2` distinction or when `output_type` is required, leaving those to 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?

States a specific verb+resource ('Read-only (eth_call) against any Ethereum contract') and scopes it to the ETH chain, which distinguishes it from the tron_read_contract sibling. It also enumerates the built-in ERC-20 helpers, so an agent knows exactly which calls are first-class versus raw-selector.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'When to use' with concrete examples (USDT/USDC balance, decimals, allowance, any view function) and an explicit 'Do not use' clause that names two exclusions: sending a transaction and historical balances. That is the full when/when-not pattern.

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.