Skip to main content
Glama

ScorpTech x402 Tools

Hamming Dist

hamming_dist
Read-onlyIdempotent

The Hamming distance of a and b: how many bit positions differ. 13 and 7 differ in 2 places. 0 and 0 differ in none. Both run from 0 to 999999999999999. Returns JSON with: a, b, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/hamming-dist

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "hamming_dist"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare the safe-read profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower, yet the description adds genuinely non-obvious context: the call is paid ($0.001 USDC per successful call via x402 on Base or Solana) and an alternate HTTPS endpoint exists. It also discloses the return shape ('a, b, value') when no output schema is present. It does not cover failure or billing-failure behavior, keeping it from 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core definition lands in the first sentence, examples immediately after, then operational facts (range, return fields, price, endpoint) in order of decreasing importance. Every sentence carries information; there is no filler or repetition of the title.

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-integer, single-value math tool with no output schema, the definition supplies semantics, range, an illustrative result, the return field names, and cost/transport details — enough to call it correctly and anticipate the charge. The only remaining gap is error/edge behavior, which is small for an idempotent pure function.

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?

With 0% schema description coverage, the description has to carry the burden, and it does: both params are named as the two operands, their shared valid range (0 to 999999999999999) is restated, and the examples ('13 and 7', '0 and 0') concretely demonstrate how values map to the result. Only per-parameter prose is missing, and the symmetry of the two params makes that minor.

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 gives a specific verb-and-resource definition: 'how many bit positions differ' between integers a and b, backed by two worked examples. It is unambiguous about what is computed, but it never distinguishes itself from the many hamming* siblings (hamming_count, hamming_index, hamming_next), so it stops short of a 5.

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 only implied: the examples show the shape of a legitimate call, but there is no statement of when to prefer this over the other hamming variants, nor any precondition or exclusion. An agent can infer it computes distance between two supplied integers, which 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