Skip to main content
Glama

AgentLogic MCP Server

token_balance

Read an address's balance of one ERC-20 token on an EVM chain. Price: $0.002 USDC on Base via x402. Returns the raw balance and the formatted balance with the token's own decimals applied.

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>",
      "token": "<token>"
    },
    "name": "token_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain to read: base (default), ethereum, polygon, arbitrum or optimism.
tokenYesERC-20 token contract address, 0x-prefixed, 40 hex characters.
addressYesWallet address holding the token, 0x-prefixed, 40 hex characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations present the description carries the full burden, and it does disclose two genuinely useful traits: the $0.002 USDC cost via x402 on Base, and the return shape (raw plus decimals-applied balance). It omits failure behavior for invalid or non-ERC-20 token addresses, unverified contracts, and whether the call is idempotent or cached.

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 operation and resource, followed by cost and return values. Every sentence carries information; nothing is redundant, though the pricing detail could be trimmed if cost were conveyed elsewhere.

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?

For a three-parameter read tool with no output schema, the description covers the operation, cost, and return format, which is enough for an agent to call it correctly. Remaining gaps are edge-case behavior on invalid input rather than core calling information.

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 100%, so all three parameters including chain options and the default are already documented in the schema. The description adds nothing parameter-specific beyond restating 'one ERC-20 token', so baseline 3 applies.

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?

States a specific verb and resource: 'Read an address's balance of one ERC-20 token on an EVM chain.' The 'ERC-20' qualifier implicitly separates it from native-balance siblings like chain_balance, but no sibling is named, so the agent must infer the boundary itself.

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 gives useful context (paid read, default chain base) but never states when to choose this over chain_balance, token_info, or the other *_balance siblings, and offers no exclusions. Usage is implied by the ERC-20 scoping rather than stated.

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.