Skip to main content
Glama

Pdi

pdi
Read-onlyIdempotent

Whether n equals the sum of its digits each raised to k. 153 with k=3, 1634 with k=4, and 4150 with k=5 do. 4150 with k=4 does not, and neither does 2 with k=3. n runs from 0 to 999999999999999 and k runs from 1 to 15. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/pdi

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>",
      "k": "<k>"
    },
    "name": "pdi"
  }
}

Input Schema

NameRequiredDescriptionDefault
kYes
nYes

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 establish read-only, idempotent, non-destructive behavior, and the description adds genuinely new operational context: a $0.001 USDC x402/Solana charge per successful call and an equivalent HTTPS endpoint. It also characteristically narrows behavior by listing the exact input domains, though it never states the return shape (boolean) explicitly.

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?

The definition is front-loaded, followed by edge-case examples, domains, then pricing/transport. The five example numbers are slightly heavy but each pair demonstrates a true and a false case, so they mostly earn their space; nothing is padded or repeated.

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 boolean predicate with a full annotation set and no output schema, the description supplies the definition, the valid domains, illustrative truth cases, and the payment/transport details an agent needs before invoking it. The only residual gap, the literal return format, is effectively implied by the 'whether' framing.

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 description coverage is 0%, so the description must carry the meaning, and it does: the predicate sentence defines n as the number under test and k as the exponent applied to each digit, then restates the domains (0–999999999999999 and 1–15). The range restatement duplicates the schema's min/max, but the semantic roles of both parameters are only available from the description.

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 precise mathematical predicate (n equals the sum of its digits each raised to k) with worked true/false examples, so an agent can tell this is a membership test rather than a generator or counter. It never expands the cryptic name/title 'pdi' to 'perfect digital invariant' and never mentions the sibling pdi_count, so differentiation relies on the agent inferring the naming convention.

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?

Usable context is implied through the valid input ranges and the positive/negative examples (153 with k=3, 4150 with k=4 fails), which implicitly tell the agent when the answer will be true. There is no explicit when-to-use statement, no exclusion, and no pointer to pdi_count for the counting variant.

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