Skip to main content
Glama

number_to_hex

Convert decimal numbers to hexadecimal strings for EVM transactions and smart contract data encoding.

Instructions

Convert a decimal number to a hex string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesThe decimal number to convert
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the basic conversion and omits key traits such as whether the output includes a '0x' prefix, how negative numbers or non-integers are handled, and what the function does with invalid input. This is a significant gap even for a simple utility.

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 a single, front-loaded sentence with no waste. It conveys the core purpose efficiently, which is appropriately sized for a simple utility.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and no output schema. The description states the basic conversion and return type, but it leaves out exact output formatting (e.g., whether '0x' is included) and input constraints. Given the absence of annotations and output schema, this is a moderate completeness gap.

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?

The input schema provides 100% coverage of the parameter with the description 'The decimal number to convert'. The tool description does not add extra meaning beyond this, but the baseline of 3 is appropriate since the schema adequately documents the parameter.

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 uses a specific verb ('Convert') and clearly states the transformation from 'decimal number' to 'hex string', which fully defines the tool's purpose. It also distinguishes itself from the sibling tool 'hex_to_number' by specifying the conversion direction.

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 its use case by naming the conversion, but it does not explicitly mention alternatives or when not to use it. The sibling 'hex_to_number' performs the reverse operation, yet no guidance is given on choosing between them.

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/nirholas/universal-crypto-mcp'

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