Skip to main content
Glama

Decimal to Hex Converter

base_convert
Read-onlyIdempotent

Converts a bounded integer string between bases 2 through 36 using exact BigInt arithmetic. Inputs contain 1–4096 digits and must be valid in the source base. Optional bitWidth (1–4096) validates a bit pattern; signed=true requires a width and reads the source value as two’s complement. Unsigned is the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesDigits 0–9/A–Z without prefix, sign or separators; valid in fromBase.
signedNoDefaults to false. When true, interpret the fitting source bit pattern as two’s complement.
toBaseYes
bitWidthNoOptional bit width; required when signed is true.
fromBaseYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior. The description adds value beyond them: exact BigInt arithmetic (no precision loss), a 1–4096 digit input bound, an explicit validity requirement in the source base, and the two's-complement reading rule when signed is true. It stops short of describing error output when input is invalid or out of range for the width.

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?

Three dense sentences, front-loaded with purpose before constraints, and every clause carries information. Minor redundancy with the schema on the signed default and bitWidth requirement keeps it just short of ideal.

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?

With an output schema present, return values need not be explained, and the description covers the input contract, the optional bitWidth/signed interaction, and the arithmetic guarantee. What remains thin is failure behavior for invalid digits or values exceeding bitWidth, which an agent would benefit from knowing before calling.

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 60%, and the description mostly restates schema text (digits 0–9/A–Z, no prefix/sign/separators, signed defaults to false, bitWidth required when signed). The undocumented fromBase/toBase parameters are only covered implicitly by 'bases 2 through 36', so it does not fully compensate for the coverage gap; baseline 3 fits.

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 (converts), a specific resource (integer string), and a precise scope (bases 2 through 36, exact BigInt arithmetic). The digit-count bound and two's-complement/bitWidth framing distinguish it from generic converters like unit_convert or decimal_to_fraction without needing to name them.

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 scope implies when to reach for it (integer base conversion with optional bit-pattern validation), and the conditional 'signed=true requires a width' is a useful usage rule. However, it never names or excludes siblings such as unit_convert, epoch_convert, roman_numeral, or decimal_to_fraction, so routing between the many converters is left to inference.

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