Skip to main content
Glama

evm_get_token_decimals

Retrieve the decimals value for an ERC-20 token on supported EVM chains to correctly format token amounts and perform precise calculations.

Instructions

Get the number of decimals for an ERC-20 token

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": {
      "chain": "<chain>",
      "tokenAddress": "<tokenAddress>"
    },
    "name": "evm_get_token_decimals"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYes
tokenAddressYesERC-20 token contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and discloses very little. It never states that this is a read-only call, what happens if the address is not a valid ERC-20 contract (revert vs. error), or that decimals is typically a small integer such as 18. For a tool with zero annotation coverage, this is a thin disclosure.

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?

A single front-loaded sentence with no redundant wording, which suits a simple getter. It is arguably under-specified rather than verbose, so it falls just short of ideal.

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?

For a two-parameter read with no output schema and no annotations, the definition covers the core purpose but omits return type/shape and error behavior. An agent can call it, but must infer failure modes and how the value is used downstream (e.g., amount formatting).

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 50%: chain is self-documenting via its enum of seven networks, and tokenAddress has a description ('ERC-20 token contract address'). The description adds no additional meaning about address format, checksumming, or cross-chain resolution. Baseline 3 applies since the schema does the heavy lifting.

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: 'Get the number of decimals for an ERC-20 token'. That is unambiguously distinct from siblings like evm_get_token_name or evm_get_token_symbol. It does not explicitly name or contrast with evm_get_token_info, which likely also surfaces decimals, so it falls short of a 5.

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?

There is no explicit when-to-use guidance, no prerequisites, and no mention of alternatives such as evm_get_token_info or evm_get_token_balance. Usage is only implied by the tool's nature as a metadata read. Adequate for a trivial getter, but an agent gets no routing help.

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

Deploy Server

Other Tools