Skip to main content
Glama

ScorpTech x402 Tools

Gray Decode

gray_decode
Read-onlyIdempotent

Decode a binary reflected Gray code back to its index. The walk xors the code with each of its right shifts. A negative code is rejected. Returns JSON with: g, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/gray-decode

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": {
      "g": "<g>"
    },
    "name": "gray_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
gYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety is covered. The description adds useful context beyond the annotations: negative inputs are rejected, the result is JSON with keys g and value, and each successful call costs $0.001 via x402 with an equivalent HTTPS endpoint. It still says nothing about error payloads or what 'value' contains, keeping this at a 3.

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?

This is a tightly structured list of short sentences with the core operation stated first, followed by the algorithm, constraints, return shape and payment details. The algorithm sentence and the pricing/HTTP sentences are useful but could be trimmed slightly, so it falls short of ideal.

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, no-output-schema read tool, this covers the operation, the input constraint, the return keys (g, value), and access costs. It omits error behavior beyond negative rejection, but nothing essential is missing.

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?

There is one parameter at 0% schema description coverage, so the description must carry the meaning of g. It identifies g as the code being decoded and notes that a negative code is rejected, which explains the optional sign in the schema pattern, but it never states that g is an arbitrarily large decimal string or how large a value is accepted.

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 gives a specific verb and resource: 'Decode a binary reflected Gray code back to its index.' It also states the algorithm (XOR with right shifts), which makes clear this is the inverse of gray_encode and distinct from gray_bits and gray_flip.

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 usage by naming the operation (convert a Gray code back to its index) and states that negative codes are rejected, but it gives no explicit guidance on when to choose this tool over gray_encode or the other Gray-code tools and names no alternatives. The usage is inferable, not spelled out.

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