Skip to main content
Glama

Bit Length

bit_length
Read-onlyIdempotent

The bit length of n: 0 for 0, and one more than the position of the highest 1 bit otherwise. 1 has length 1, 255 has length 8, and 256 has length 9. 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-length

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>"
    },
    "name": "bit_length"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely non-structured context: a paid call at $0.001 USDC per successful call via x402 on Solana, plus an equivalent HTTPS endpoint. It does not say what happens on out-of-range input, keeping it short of 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?

Definition and examples are front-loaded in the first sentence; pricing and endpoint follow. The restated numeric range overlaps the schema slightly but costs only a clause, so waste is minimal.

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 pure-computation tool with no output schema, the description supplies the computation, examples, input bounds, and payment/logistics details. Only the return type and out-of-range error behavior are left implicit, which is a minor gap.

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 description coverage is 0%, so the description must carry the parameter meaning — and it does, defining exactly what 'bit length of n' computes and illustrating edge cases (0, 1, 255, 256). The stated range duplicates the schema's min/max rather than adding to it, so it is not a full 5.

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 specific mathematical operation with a formal definition ('0 for 0, and one more than the position of the highest 1 bit otherwise') plus concrete examples (1→1, 255→8, 256→9). An agent can distinguish this from siblings like popcount, byte_sum, ternary_len, or negabinary_len without ambiguity.

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

Usage Guidelines4/5

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

The domain restriction (n runs from 0 to 999999999999999) gives clear applicability context, and the examples show expected inputs. However, no alternative tool is named and no when-not guidance is given (e.g., what to do for values above the cap).

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