Skip to main content
Glama

ScorpTech x402 Tools

Negabinary Bits

negabinary_bits
Read-onlyIdempotent

How many 1 digits the base -2 writing of n has. 0 has none, 1 has 1, 6 has 3, and 7 has 4. n runs from 0 to 999999999999. Returns JSON with: n, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/negabinary-bits

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": "negabinary_bits"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds genuinely useful context beyond that: the call is paid ($0.001 USDC per successful call via x402 on Base or Solana), the response shape is {n, value}, and an equivalent HTTPS endpoint is given. It does not cover failure/payment-refused behavior, which keeps 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?

The definition is front-loaded with the core semantics and examples, then appends operational details (return keys, price, endpoint) in a compact run. The domain restatement ('n runs from 0 to 999999999999') duplicates the schema and is the one sentence that does not fully earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter pure numeric function with no output schema, the description supplies everything an agent needs: exact semantics, concrete examples, input domain, return keys, cost, payment rail, and an alternate transport. Annotations handle the safety profile, so nothing material is left uncovered.

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 description coverage is 0% for the single parameter n, so the description must carry the meaning, and it does loosely by framing n as the number whose negabinary writing is examined. The explicit range '0 to 999999999999' merely restates the schema minimum/maximum, adding no new meaning, so this stays at minimum-viable rather than strong.

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?

The description states a precise verb+resource: counting the 1-digits in the base -2 (negabinary) representation of n. The worked examples (0 has none, 1 has 1, 6 has 3, 7 has 4) pin the semantics exactly, making it distinguishable from siblings like negabinary, negabinary_len, or negabinary_digit without opening any schema.

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?

Usage is implied by the mathematical definition, and for a single-argument pure function that is largely enough. However, there is no explicit when-to-use framing, no statement of when a caller should choose negabinary itself or negabinary_len instead, and no mention of what happens on out-of-range or non-integer input.

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