Skip to main content
Glama

normalize_token_amount

Read-onlyIdempotent

Convert raw on-chain base units to human-readable token amounts using each token's decimals, returning the amount and decimals and erroring on unsupported tokens.

Instructions

Normalise raw on-chain base units to a human token amount using the token's decimals (USDC/USDT/EURC=6, SOL=9, ETH=18). Returns amount and decimals. Errors on an unsupported token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_symbolYesToken symbol, e.g. USDC, ETH, SOL.
raw_base_unitsYesRaw integer base units (smallest unit).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.3

TDQS

A4.2/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. The description adds genuine behavioral context: it states it errors on unsupported tokens and that it returns amount plus decimals, which the annotations do not convey.

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?

Three short sentences, front-loaded with the core conversion action and its basis, followed by return values and the error case. No filler and every clause carries information.

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?

An output schema exists, so the return shape need not be described, yet the description still summarizes it briefly. Combined with the annotation-covered safety profile and the documented error case, an agent has what it needs; only explicit when-to-use routing between siblings is missing.

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 description coverage is 100%, so the baseline is 3, and the description earns an extra point by specifying the supported token set with explicit decimal values (USDC/USDT/EURC=6, SOL=9, ETH=18), which meaningfully constrains valid token_symbol inputs beyond what the schema declares.

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 ('normalise') and a precise resource ('raw on-chain base units' to 'human token amount'), and even names the conversion basis. It is clearly distinguishable from siblings like normalize_x402 or normalize_ap2, which normalise entirely different payload types.

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 purpose implies when it applies (converting raw base units for display/human-readable output), and it notes it errors on unsupported tokens, which is a useful boundary. However, it never explicitly states when to reach for this versus another tool, nor does it name any alternative, so guidance is only implied.

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