Skip to main content
Glama

bit_count

Count set bits and total bits, convert integers between decimal, binary, hex, and octal, and detect powers of two from a single value.

Instructions

Count set bits (popcount), total bits, and convert between decimal, binary, hex, and octal. Detects powers of two.

Input Schema

NameRequiredDescriptionDefault
valueYesInteger or binary/hex string (e.g. 42, 0xFF, 0b1010)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It states what operations are performed but gives no information about the return format (e.g., whether all results are returned at once or a mode is needed), error handling, or output structure. For a tool with no output schema, this is a notable gap.

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, dense sentence that front-loads the core capabilities with no filler. Every clause contributes to understanding the tool's scope, making it appropriately sized and structured.

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 performs multiple computations but has no output schema. The description enumerates the operations but does not explain what the return value looks like (e.g., an object containing popcount, total bits, and conversions) or how the agent should interpret the output. Given the absence of annotations and output schema, this is a clear but incomplete context.

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 has 100% description coverage and already documents the single 'value' parameter with examples like '42, 0xFF, 0b1010'. The description lists conversion formats but adds no syntax, range, or edge-case details beyond what the schema provides, so the baseline score of 3 applies.

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 states specific operations: 'Count set bits (popcount), total bits, and convert between decimal, binary, hex, and octal. Detects powers of two.' This clearly describes what the tool does beyond a vague restatement. However, it does not explicitly differentiate from siblings like base_convert or number_base_convert, which overlap in the base-conversion capability.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. It simply lists capabilities, leaving the agent to infer appropriate usage context.

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