Skip to main content
Glama

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. Price: $0.001 USDC per successful call (x402, 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.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds meaningful context they don't: it is a paid x402/Solana endpoint, charging $0.001 USDC per successful call (so failures aren't billed), plus an equivalent HTTPS alternative. It stops short of explaining payment-failure or retry behavior, so not 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.

Conciseness4/5

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

Front-loaded with the purpose and a worked example, then edge case, range, and pricing. Nearly every sentence earns its place; the pricing/endpoint sentence muddles concerns slightly but is operationally relevant.

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 single-parameter tool with no output schema, the description fully specifies the return format (comma-separated chain, with examples including the fixed-point case 6174→'6174'), the input range, the rejection rule, and the payment model — everything an agent needs to call it correctly.

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 must carry parameter meaning. It restates the 0–9999 range and adds the important rule that repdigit inputs are rejected, but leaves open what happens for n<1000 (zero-padding vs. rejection), a real semantic gap for a four-digit procedure.

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 verb (compute the chain) and resource (four-digit Kaprekar chain), with a concrete I/O example that makes the output shape unambiguous. It does not explicitly distinguish itself from the many kaprekar_* siblings (step, steps, kernel, repdigit), so an agent must infer the difference from the 'chain / comma-separated' phrasing.

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 example shows what a call yields, and the 'repdigit is rejected' note flags an edge case, but there is no explicit when-to-use-this-vs-a-sibling guidance despite six nearby kaprekar tools. No exclusions or routing hints are given.

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