Skip to main content
Glama

int_widths

Check which integer widths (i8 to i64, u8 to u64) accommodate a number, show the wrapped value when they overflow, and flag values over 2^53 for JS/JSON round-trip issues.

Instructions

Which widths (i8..i64/u8..u64) hold N, and the wrapped value where they do not. Flags anything past 2^53 as unable to round-trip through a JS number or JSON float. int_widths(3000000000) shows the i32 wrap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that output includes both holding widths and wrapped values, and it adds nuanced information about JS number/JSON float round-trip limitations beyond 2^53. The concrete example illustrates the i32 wrap behavior. It does not mention edge cases like negative numbers or extremes, but for a straightforward integer query tool, this is adequate.

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?

Two sentences with an inline example Deliver the core information without wasted words. The first sentence states the core function, the second adds the precision caveat, and the example reinforces both. This is excellent conciseness.

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 simple one-parameter tool with an output schema present, the description covers the key behavior: width fit, wrapped values, and the 2^53 precision boundary. It could be slightly more complete by addressing negative numbers or clarifying the output format, but the output schema likely handles that. Overall, the description gives enough context for confident invocation.

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?

The schema has 0% description coverage for the single parameter n, so the description must compensate. It does so by labeling the input as 'N' and showcasing `int_widths(3000000000)` directly in the text. This makes the parameter's role clear as the integer to be analyzed. The schema already declares type integer, and the description adds the contextual meaning without redundancy.

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 identifies the tool's purpose: to determine which integer widths (i8..i64/u8..u64) can hold a given N and to report wrapped values when they cannot. It distinguishes itself from sibling tools like data_sizes or bit_analysis by focusing specifically on width fit and overflow behavior. The verb is implicit rather than explicit, but the meaning is unambiguous.

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 through the example and the mention of 2^53 limits, but it does not explicitly state when to prefer this tool over alternatives like data_sizes, bit_analysis, or base_repr. There is no mention of exclusions or typical scenarios, though the example demonstrates a use case. This is sufficient for a niche tool but lacks explicit guidance.

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

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