Skip to main content
Glama

ScorpTech x402 Tools

Gray Flip

gray_flip
Read-onlyIdempotent

The single bit that flips in the binary reflected Gray code when the index goes from n to n+1. Bit 0 is the least significant bit. A negative index is rejected. Returns JSON with: n, bit. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/gray-flip

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/non-destructive already supplied), the description discloses error behavior (negative index rejected), the exact return fields (n, bit), and — critically — the commercial/auth model: $0.001 USDC per successful call via x402 on Base or Solana, plus a direct HTTPS endpoint. Cost and payment requirements are exactly the kind of context annotations cannot convey.

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?

Front-loaded with the core definition, then conventions, error behavior, return shape, and pricing — each sentence carries distinct information. The pricing/endpoint sentence is slightly appended but still earns its place by preventing an agent from calling without payment context.

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, no-output-schema primitive, the description supplies the return fields, the error case, the bit-indexing convention, and the payment/transport details. An agent has everything needed to call it correctly and knows what comes back.

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% (the lone n parameter has only a pattern and maxLength), so the description must carry the load: it explains that n is an index, that bit 0 is the LSB, and that negatives are rejected. It does not mention that n is passed as a string permitting 200-digit values, leaving one gap.

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 names a precise mathematical output: the single bit index that flips in the binary reflected Gray code between n and n+1. That is specific enough to separate it from siblings like gray_encode (returns the code word) or gray_next (advances the value), though no sibling is named explicitly.

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 definition — you call it when you need the flip position rather than the Gray code itself — but there is no explicit when-to-use/when-not statement or routing to alternatives such as gray_next or gray_bits. For a pure math primitive this is minimally adequate.

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