Skip to main content
Glama

Hex converter

util_hex

Use when an agent has raw RPC output and must read it as a number or as text: converts between hex, decimal and UTF-8 in one call, with big integers kept exact because a 32-byte word overflows a JavaScript number. Do not use to decode a whole ABI-encoded struct: this converts one value. No API key, no account. $0.005 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
asNohex | decimal | text. What the value IS. Defaults to autodetect.
valueYesA 0x-prefixed hex string, a decimal number, or text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses big-integer exactness because a 32-byte word overflows a JS number, that no API key or account is needed, and the exact price ($0.005/call via x402 USDC). The only gap is that it never says what the return shape looks like (single string value, both representations, etc.), and no output schema exists to cover that.

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?

Roughly four sentences, all front-loaded: trigger, scope limit, operational cost/auth facts. Every sentence answers a decision an agent would otherwise have to guess at, and nothing is repeated from the schema.

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?

For a two-parameter pure-function utility this is close to complete — conversion scope, precision caveat, auth, and pricing are all covered. The missing piece is return-value behavior, since there is no output schema to describe whether the answer comes back as a single string or multiple representations.

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 coverage is 100%, so both `value` and `as` (with its hex | decimal | text enum) are already fully documented in the input schema. The description mentions the three conversion types but adds no per-parameter guidance beyond what the schema states, so the baseline 3 applies.

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 — converts between hex, decimal and UTF-8 for raw RPC output — and names the exact scope (one value, not a whole ABI struct), which separates it from siblings like util_base64 or util_selector. An agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly gives a trigger condition (agent has raw RPC output needing numeric or text interpretation) and an exclusion (do not use to decode a whole ABI-encoded struct, this converts one value). It stops short of naming an alternative tool for the excluded case, which would have made it a 5.

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