Skip to main content
Glama

Harshad Base

harshad_base
Read-onlyIdempotent

Whether n is a Harshad number in base b: n is divisible by the sum of its base-b digits. 10 is Harshad in base 2. 13 is not Harshad in base 10. n runs from 1 to 999999999999999, and b runs from 2 to 36. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/harshad-base

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>",
      "base": "<base>"
    },
    "name": "harshad_base"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes
baseYes

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 readOnly/idempotent/non-destructive, but the description adds material context they don't cover: a $0.001 USDC charge per successful call via x402 on Solana, plus an HTTPS fallback endpoint. It also pins the accepted input domain. It stops short of saying the call returns a boolean versus a structured object.

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 definition, followed by two short examples, then constraints, then pricing. Every sentence is useful, though the second worked example is somewhat redundant once the criterion is stated.

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 two-parameter predicate with no output schema, the description supplies the decision rule, worked examples, valid input ranges, payment requirement, and an alternate transport. An agent has everything needed to invoke it correctly and anticipate a boolean answer from 'Whether n is a Harshad number'.

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 0%, so the description carries the full burden and mostly does: it names n and b, gives their ranges (1–999999999999999 and 2–36), and explains what 'base b' means mathematically. It adds real meaning beyond bare integer bounds, though it doesn't state that base defaults to nothing or what happens for out-of-range input.

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 precise verb+resource: tests whether n is a Harshad number in a given base, and defines the criterion (divisible by the sum of base-b digits). The 'in base b' framing implicitly separates it from the plain `harshad` sibling (base-10 only), but it never names that sibling, so differentiation is left to inference.

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 by the definition — there is no statement of when to pick this over `harshad` or a digit-sum tool, and no prerequisites/exclusions. The worked examples (10 is Harshad in base 2, 13 is not in base 10) help an agent confirm the semantics but are not routing guidance.

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