Skip to main content
Glama

Token unit converter

util_units

Use when an agent must turn an on-chain integer into a human amount, or back, without losing money to rounding: converts between wei, gwei, ether and any token decimals with exact integer maths, no floating point. Being off by a factor of a thousand on decimals is the mistake that costs real funds. Do not use to find a token's decimals (/v1/evm/token-info returns them). No API key, no account. $0.005 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
toYeswei | gwei | ether, or a number of decimals.
fromYeswei | gwei | ether, or a number of decimals.
amountYesThe quantity, as a string to avoid float loss.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: exact integer maths / no floating point, no API key, no account, and a concrete price ($0.005 per call via x402 USDC) with the rounding-risk failure mode flagged. The residual gap is the return shape (string vs number) and what happens on an unrecognized unit, which are not stated anywhere.

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-loaded with 'Use when', then rationale, then exclusion, then cost — a sensible ordering with no wasted sentences. The clause 'Being off by a factor of a thousand on decimals is the mistake that costs real funds' partly repeats the earlier 'without losing money to rounding' point and is the one line that could be trimmed.

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 3-param, no-annotation, no-output-schema utility this covers the operational essentials: cost, auth, precision guarantees and a redirect to the sibling that supplies decimals. An agent still has to guess the response format, which is the only meaningful omission.

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 100% and all three parameters are self-documenting, including the reason `amount` is a string, so the schema already does this work. The description restates the accepted unit vocabulary ('wei, gwei, ether, or decimals') but adds no format example or edge-case guidance beyond it — baseline 3.

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?

Specific verb+resource: 'converts between wei, gwei, ether and any token decimals with exact integer maths'. It also carves out a clear boundary against evm_token_info, so an agent can place it among siblings like fx_convert, time_convert and util_hex without opening a schema.

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?

States the exact triggering condition ('turn an on-chain integer into a human amount, or back') and an explicit exclusion with the alternative named ('Do not use to find a token's decimals (/v1/evm/token-info returns them)'). Both when-to-use and when-not-to-use are present.

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