Skip to main content
Glama

Bit Reverse

bit_reverse
Read-onlyIdempotent

Reverse the lowest width bits of n. 13 reversed in width 4 is 11. 1 reversed in width 8 is 128. n must be smaller than 2^width. width runs from 1 to 62, and n runs from 0 to 999999999999999. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/bit-reverse

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "n": "<n>",
      "width": "<width>"
    },
    "name": "bit_reverse"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes
widthYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world, so the safety profile is covered; the description adds genuinely new operational context not in annotations: the cross-parameter precondition n < 2^width, the per-call price ($0.001 USDC, x402 on Solana), and an alternate HTTPS endpoint. It still doesn't say what happens when the precondition is violated (error vs truncation).

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?

The core behavior and examples come first, followed by constraints then pricing/endpoint details — a sensible front-loaded order with no filler sentences. The pricing and URL clause is dense but operationally relevant for an x402 tool.

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, no-output-schema math tool with annotations covering safety, the description gives behavior, examples, bounds, the cross-field constraint, and cost/access details. Only the shape of the result (a plain integer?) and error behavior for out-of-range input remain unstated.

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?

Schema coverage is 0%, so the description must carry the load. It does explain the semantics of both params ('lowest width bits of n', width as a bit-count bounding the reversal) and supplies the key cross-field constraint n < 2^width that the schema cannot express. The stated min/max ranges merely repeat schema bounds and the return type is not described.

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 precise verb+resource ('reverse the lowest width bits of n') and backs it with two worked examples (13→11 at width 4, 1→128 at width 8), which removes any ambiguity versus siblings like digit_rev, bit_length, or gray_bits.

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 the use case (binary/bitwise reversal within a fixed width) and gives validating examples, but never states when to prefer it over near-neighbors such as digit_rev or gray_encode, nor any conditions where it is inappropriate.

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