Skip to main content
Glama

chain_units

Read-only

Wei / gwei / ether and token-decimals converter — Exact BigInt conversion of an amount between EVM units (wei, kwei, mwei, gwei, szabo, finney, ether) or token decimals (e.g. decimals=6 for USDC): returns base units (decimal + hex) and every ETH unit. No floating-point rounding; rejects amounts with more decimals than the unit allows. Params: value, from (default ether) or decimals. Price: $0.001 USDC (Base, via x402).

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": {
      "value": "<value>",
      "from": "<from>"
    },
    "name": "chain_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromYesether
valueYes1.5

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare a safe read-only open-world op; the description adds substantial non-obvious behavior: exactness guarantees (no floating-point rounding), rejection of over-precise amounts, the full return payload (base units in decimal + hex plus every ETH unit), and a paid x402 endpoint at $0.001 USDC. The payment requirement is exactly the kind of operational fact an agent cannot infer from annotations.

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 core verb and resource, then behavior, then params, then price — a sensible ordering with little waste. The unit enumeration is long but functional; the only drag is the trailing price tagline appended inline rather than separated.

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?

With no output schema, the description correctly compensates by summarizing the return shape (base units decimal + hex plus all ETH units). It also covers precision failure mode and payment, which are the two things most likely to cause a failed or misrouted call.

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 nominally 100%, but the schema 'descriptions' are only example values ('ether', '1.5'), so the description does real work by explaining the ether default and the token-decimals mode. However, it introduces a `decimals` parameter that does not exist in the schema and calls `from` defaulted while the schema marks it required — a mismatch that could confuse argument construction.

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?

Names a specific verb and resource (exact BigInt conversion of an amount between EVM units/token decimals) and enumerates the unit set, so it is immediately distinguishable from every chain_* query sibling. The scope (unit conversion only, not balance lookups) is unambiguous.

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

Usage Guidelines4/5

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

Gives clear context cues — use it when you need wei/gwei/ether or token-decimal conversion, with `from` defaulting to ether or `decimals=6` for USDC. It stops short of naming alternatives or stating when-not to use it, but the task is narrow enough that no ambiguity remains.

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