Skip to main content
Glama

ScorpTech x402 Tools

Token Units

token_units
Read-onlyIdempotent

Exact (string-math, no floating point) conversion between human token amounts and on-chain base units: wei / gwei / ether, lamports / SOL, sats / BTC, USDC/USDT (6 decimals) or any token with a decimals value. Returns the converted amount, the integer base units (decimal and hex) and every unit of the family. Accepts decimals, scientific notation and 0x-hex raw amounts. Returns JSON with: amount, from, to, result, baseUnits, baseUnitsHex, fitsUint256, units. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/token-units

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": {
      "amount": "<amount>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "token_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget unit
fromYesUnit of amount (raw = integer base units)
amountYesAmount: 1.5, 2e-6, 1500000, or 0x-hex (base units)
decimalsNoToken decimals, needed for unit "token" (and for raw <-> token)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, and the description adds genuinely new context beyond them: no floating-point math, the exact JSON return fields (amount, from, to, result, baseUnits, baseUnitsHex, fitsUint256, units), and a per-call price of $0.001 USDC via x402 on Base or Solana. The only real cost/limit disclosure an agent might still want is failure behavior (when a call is charged), which is not stated.

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 the core purpose, then input formats, then the return shape, then pricing and the HTTPS fallback — a sensible order with no filler sentences. The trailing return-field enumeration and endpoint URL make it denser than strictly necessary, but each item carries information an agent would otherwise have to discover.

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 takes on the burden of describing returns and does so explicitly by naming the JSON fields, and it also covers accepted input syntax, decimals requirements, payment model, and an alternate transport. For a 4-parameter pure-arithmetic tool this leaves nothing an agent needs in order to call it correctly.

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% — enums, the amount format note, and the decimals 0–77 range are all documented in the schema, so the baseline is 3. The description does add a little framing (unit "token" requires decimals; raw means integer base units; hex and scientific notation accepted), but it largely restates what the schema already provides.

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 and resource — exact, string-math conversion between human token amounts and on-chain base units — and enumerates the exact unit families covered (wei/gwei/ether, lamports/SOL, sats/BTC, USDC/USDT, arbitrary decimals). No sibling tool does unit conversion, so the scope is unambiguous without comparison.

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 makes the use case clear by listing the supported unit families and input formats, which implies when to reach for it. However, it never states when NOT to use it or points to an alternative (e.g. raw on-chain transfer lookups vs. this arithmetic conversion), so guidance is implied rather than explicit.

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