Skip to main content
Glama
laszlopere

mcp-bytesmith

num_convert

Convert a big integer between hex, decimal, binary, and octal bases. Handles negative numbers, radix prefixes, and optional zero-padding, with arbitrary precision.

Instructions

Convert a big-integer between bases (hex/dec/bin/oct).

Parses value as a from_base integer (a leading 0x/0b/0o and a - sign are accepted) and renders it in to_base, prefixed for non-decimal output. pad_bytes zero-fills the output to that byte width (a minimum, never truncating); it is bit-aligned, so it is rejected for decimal output. Arbitrary precision — a 32-byte RPC value converts losslessly. Returns {value, from_base, to_base, result}. Example: num_convert("255", "dec", "hex") -> result "0xff"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesInteger to convert, read in `from_base`; a leading 0x/0b/0o radix prefix and a '-' sign are accepted.
from_baseYesBase of `value`: hex (16), dec (10), bin (2), oct (8).
to_baseYesBase to render the result in; non-decimal output is prefixed 0x/0b/0o.
pad_bytesNoZero-fill the output to this byte width (a minimum, never truncating); bit-aligned, so rejected for decimal output. Default None means no padding.
Behavior4/5

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

Without annotations, the description carries the full burden. It explains accepted prefixes, non-decimal output prefixing, pad_bytes behavior (minimum, never truncating, bit-aligned, rejected for decimal), arbitrary precision, and return keys. It lacks error handling details but is otherwise thorough.

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?

The description is concise at four sentences, well-structured with purpose first, then details, then example. No redundant 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?

Given no output schema and no annotations, the description covers input format, bases, padding, precision, and return keys. It includes an example. It could mention error handling but is sufficient for the tool's complexity.

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 coverage is 100%, providing baseline 3. The description adds significant value by clarifying pad_bytes is a minimum, never truncating, bit-aligned, and rejected for decimal; explains output prefixes; and describes return structure. It goes beyond the schema.

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?

The description clearly states 'Convert a big-integer between bases (hex/dec/bin/oct)', using a specific verb and resource. It distinguishes itself from sibling tools like byte_order or encode by focusing on base conversion with arbitrary precision and giving an example.

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 implies usage for base conversion but does not explicitly state when to use or avoid this tool compared to alternatives. No guidance on when not to use or mention of sibling differences.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server