Skip to main content
Glama

x402-hamming

Hamming: Calculate the Hamming distance between two equal-length strings (number of positions where characters differ). Provide a (or text) and b (or other).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aNoA to process
bNoB to process
textNoText to process
otherNoOther to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / a
      Added value: +{
      +  "description": "A to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / b
      Added value: +{
      +  "description": "B to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / other
      Added value: +{
      +  "description": "Other to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Text to process",
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It clearly conveys the deterministic, side-effect-free nature of the computation and what the returned number means. It does not state what happens on unequal-length input (error vs. truncation), which is the one behavioral edge case that matters here.

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?

Two sentences, zero waste. Purpose and definition come first, the parameter instruction second, and nothing is repeated from structured fields.

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

Completeness3/5

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

For a simple deterministic calculator with no output schema and no annotations, the description covers purpose and parameter aliasing adequately. It omits the return type (an integer count) and the failure mode for unequal-length inputs, leaving a small but real 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 coverage is 100%, but the schema's own descriptions are tautological ('A to process', 'Other to process'). The description adds real meaning the schema does not: it maps the four raw parameters onto two logical inputs via aliases ('a (or text)' and 'b (or other)'), which is essential for correct invocation.

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 verb and resource ('Calculate the Hamming distance') and defines the metric inline as 'the number of positions where characters differ'. The explicit 'between two equal-length strings' scope distinguishes it from the sibling x402-hamming-weight, which operates on a single string.

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 constraint 'equal-length strings' implicitly tells the agent when this metric applies and when it does not, which is genuinely useful. However, it never names an alternative (e.g. x402-levenshtein-distance, which tolerates unequal lengths), so the agent must infer the routing decision itself.

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