Skip to main content
Glama

ScorpTech x402 Tools

Kaprekar Chain

kaprekar_chain
Read-onlyIdempotent

The four-digit Kaprekar chain from n through 6174, comma-separated. 3524 gives "3524,3087,8352,6174" and 6174 gives "6174". A repdigit is rejected. n runs from 0 to 9999. 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/kaprekar-chain

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses the rejection rule for repdigits, the termination behavior at 6174, the returned field names (n, value), the per-call price of $0.001 USDC via x402 on Base or Solana, and an equivalent HTTPS endpoint — meaningful operational context. It stops short of describing error payloads or what a charged-but-failed call looks like.

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?

Purpose is front-loaded in the first clause, followed by examples, constraints, return shape, then commercial and transport details in descending priority. Slightly redundant with the schema on the 0-9999 range, and the pricing/endpoint tail is dense but each element is operational rather than filler.

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?

With no output schema, the description supplies return fields and examples, plus the rejection edge case and payment model, which is enough to call correctly. The remaining gap is the treatment of n values below 1000, which matters given the 'four-digit' framing of the output.

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 coverage is 0%, so the description carries the burden, and it partly does: the worked example shows that n is the chain's starting value. However, "n runs from 0 to 9999" merely restates the schema minimum/maximum, and it never resolves how values below 1000 (which are not four-digit) are treated or padded — a real ambiguity for a tool whose output is a "four-digit" chain.

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?

States a specific resource and result: "The four-digit Kaprekar chain from n through 6174, comma-separated," anchored by a concrete example input/output pair. It does not explicitly contrast itself with nearby siblings such as kaprekar, kaprekar_step, or kaprekar_steps, so an agent must infer the distinction from the word "chain."

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 through examples (3524 gives a full chain, 6174 gives a single element) and the constraint that a repdigit is rejected. There is no explicit statement of when to choose this over kaprekar_step/kaprekar_steps, nor any note on what a caller should do instead when n is a repdigit.

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