Skip to main content
Glama

Duo Data Utilities

Integer conversion between arbitrary numeric bases 2–36

num_radix
Read-onlyIdempotent

Convert an integer between any two numeric bases from 2 to 36, with arbitrary precision so values far beyond 2^53 are exact. Accepts an optional sign and common prefixes (0x, 0b, 0o), validates every digit against the source base, and returns the value in the target base, in decimal, and as its bit length and digit count. Price: $0.05 per successful call, paid over x402 (USDC on Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoTarget base 2-36, default 10. Accepted: integer 2-36.
caseNoDigit case for bases above 10: lower (default) or upper. Accepted: lower, upper.
fromNoSource base 2-36, or auto (default) to read a 0x/0b/0o prefix. Accepted: integer 2-36, or 'auto'.
valueYesInteger to convert; optional sign and 0x/0b/0o prefix. Accepted: at most 1024 characters.
prefixNoEmit 0x/0b/0o where conventional. Default false. Accepted: true or false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world behavior, so the safety profile is covered. The description adds genuinely useful context beyond that: arbitrary precision beyond 2^53, digit validation against the source base, the exact shape of the returned data, and a non-trivial pricing/payment requirement ($0.05 via x402 USDC on Base). The payment model is important operational context an agent should know before invoking.

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 tight sentences, front-loaded with the core operation and precision guarantee, followed by input acceptance rules and the return overview. The pricing sentence is brief and earns its place given it is a paid call.

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?

For a single-purpose conversion tool with no output schema, the description fully covers what an agent needs: input forms accepted, precision behavior, validation, return contents (target base, decimal, bit length, digit count), and the cost/payment mechanism. Nothing material is left unstated.

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%, so all five parameters are already documented in the schema, making 3 the baseline. The description reinforces that a sign and 0x/0b/0o prefixes are accepted and that output includes decimal plus bit length and digit count, but adds no syntax or format detail beyond what the schema 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 ('Convert an integer between any two numeric bases 2 to 36') and immediately scopes it with the arbitrary-precision guarantee. This distinguishes it cleanly from sibling numeric tools like num_stats, num_words, and num_allocate, which operate on very different resources.

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 explains what inputs are accepted and what the output contains, implying the usage context, but never states when to choose this tool versus a sibling or when it is inappropriate. No explicit alternatives or exclusions are named. Adequate but with a clear routing gap.

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