Skip to main content
Glama

gray_code

Convert binary values to Gray code or back, and generate n-bit Gray code sequences by specifying bit width and optional value.

Instructions

Convert between binary and Gray code, or generate n-bit Gray code sequences.

Input Schema

NameRequiredDescriptionDefault
nYesBit width (1-20)
valueNoOptional value to convert (omit for full sequence)
to_grayNoIf true convert binary to Gray; if false convert Gray to binary (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.5/5.0
Behavior3/5

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

No annotations, so description must carry behavioral burden. It describes the operation but doesn't disclose output format, error conditions, or determinism. For a pure computation tool, this is minimally 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?

Single sentence, front-loaded with the primary action, zero waste.

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?

Given low complexity and rich schema, the description covers the core purpose. However, without an output schema, it doesn't describe the return value format (e.g., number vs array for sequences), leaving a minor 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?

Schema coverage is 100%, so the schema already documents all parameters including defaults. The description adds no syntax or format detail beyond what the schema provides, so baseline 3.

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?

States a specific verb ('Convert', 'generate') and resource ('binary and Gray code', 'n-bit Gray code sequences'). It does not explicitly differentiate from sibling conversion tools, so not 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?

Implies two modes (conversion vs sequence generation) via 'or generate n-bit Gray code sequences', but provides no explicit when-to-use guidance or comparison to alternatives like base_convert.

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

Deploy Server

Other Tools