Skip to main content
Glama

ScorpTech x402 Tools

Factoradic Digit

factoradic_digit
Read-onlyIdempotent

The digit of the k! place of n. It is floor(n / k!) mod (k+1), and it is 0 when k! exceeds n. The 0! digit is always 0. For 463 the 5! digit is 3 and the 4! digit is 4. k runs from 0 to 20. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/factoradic-digit

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

Input Schema

NameRequiredDescriptionDefault
kYes
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered; the description goes beyond them by disclosing a real operational constraint the annotations cannot express — a $0.001 USDC x402 charge per successful call on Solana, plus an equivalent HTTPS endpoint. It also documents the edge cases (k! > n returns 0, the 0! digit is always 0), which materially affect how results should be read.

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 and formula, followed by a concrete worked example (463 → 5! digit 3, 4! digit 4) that resolves ambiguity cheaply. The pricing and endpoint sentences are dense but non-redundant; the whole thing stays compact despite carrying a lot.

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, no-output-schema computation, nothing an agent needs is missing: return type is a single digit, both parameters are explained, domain limits match the schema, edge cases are stated, and the payment/transport constraints are disclosed. Annotations cover safety, so the description does not need to repeat it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so well: it explains that n is the value being decomposed and k is the place index, bounds k to 0–20 (matching the schema maximum), and defines the exact output for the degenerate cases. This is meaningfully more than the bare integer schema provides.

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 definition — 'the digit of the k! place of n' — plus the closed-form formula floor(n / k!) mod (k+1), which leaves no ambiguity about what is computed. It never names the adjacent siblings (factoradic, factoradic_decode, factoradic_length), so an agent must infer on its own that this returns a single digit rather than the full representation.

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 by the definition and by the stated domain 'k runs from 0 to 20', but there is no explicit 'use this instead of factoradic_decode when…' routing and no statement of when the tool is not appropriate. For a dense family of factoradic siblings, an explicit alternative would have been valuable.

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