Skip to main content
Glama

float_repr

Inspect the binary64 representation of a float: exact stored value, raw bits, ULP, and neighbors. Verify if the input is exactly representable, with warnings for large integers.

Instructions

What binary64 actually stores for X: exact value, raw bits, ULP, both neighbours, and whether the literal is representable. float_repr(0.1) shows 0.1000000000000000055511151231257827...; float_repr(0.25) says EXACT. Above 2^53 warns consecutive integers are indistinguishable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / x / title
      Added value: +"X"
    • addedInput schema / title
      Added value: +"float_reprArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden and does so well: it explains the output items (exact value, raw bits, ULP, neighbors, representability), gives concrete examples for both round (0.25 → EXACT) and non-round (0.1 → ...0055511151231257827) cases, and surfaces the 2^53 edge-case caveat. Minor gap: it doesn't cover special values like NaN/Infinity or state the return format explicitly, keeping it from a 5.

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 sentences, zero waste, and the most important information (output contents) is front-loaded. The prose is telegraphic in places ('...says EXACT.') and the final sentence is somewhat awkwardly phrased, but the density of useful information per word is high.

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 single-parameter tool with no annotations and no output schema, the description covers the essential ground: what's returned, representability behavior, and a precision edge case. It could mention the output format for special float values (NaN, Infinity, negative zero) to be fully complete for a tool that inspects IEEE 754 internals, but the coverage is solid given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% with one required parameter, so the description must compensate—and it does so exceptionally. The phrase 'what binary64 actually stores for X' grounds the parameter's meaning, and the worked examples (0.1 and 0.25) clarify how x is interpreted and what output to expect. This exceeds what a typical schema description would convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does—showing what binary64 stores for X, including exact value, raw bits, ULP, neighbors, and representability—which is a specific, well-scoped purpose. It's topically distinct from siblings like base_repr or int_widths, though it doesn't explicitly name them. The construction is somewhat fragmented/passive rather than a clean 'verb + resource' statement, so it doesn't earn a 5.

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 usage context is implied—if you need to inspect binary64 float internals, this is the tool—but there's no explicit guidance on when to use this versus the many math/CS sibling tools, nor any 'when not to use' advice. For a large sibling family with a 0% schema coverage and no annotations, an explicit alternative mention (e.g., base_repr for integers) would elevate this beyond the implied level.

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

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/The-40-Thieves/codecalc'

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