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. Returns JSON with: n, k, value. Price: $0.001 USDC per successful call (x402, Base or 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.3/5.0
Behavior4/5

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

Goes well beyond the annotations (which only cover read-only/idempotent/open-world) by disclosing edge-case behavior (digit is 0 when k! exceeds n; the 0! digit is always 0), the return keys (n, k, value), the pricing model ($0.001 USDC per successful call via x402 on Base or Solana), and an alternate HTTPS endpoint. Missing only operational details such as failure/refund behavior or rate limits for the paid call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Front-loaded with the definition and formula, then the edge cases, the example, the return shape, and finally the commercial/transport details — each sentence adds a distinct piece of information with no filler. Compact for the amount of behavioral detail it conveys.

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?

No output schema or parameter descriptions exist, so the description has to cover return values and parameter semantics itself, and it does: return keys are enumerated and both parameters are bounded and explained. For a pure idempotent math function, nothing an agent needs in order to call it correctly is missing.

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?

With 0% schema description coverage the description must carry the load, and it largely does for k: its meaning (k! place), its valid range (0–20), and its two edge-case semantics. n is only defined implicitly as the number whose digit is taken, and the description adds nothing about its 999999999999999 upper bound, so one parameter remains thin.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the exact computation with a precise verb+resource: 'The digit of the k! place of n', followed by the closed-form formula floor(n/k!) mod (k+1) and a worked example (463 → 5! digit 3, 4! digit 4). This makes it trivially distinguishable from a sibling like factoradic that would return the whole 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 mathematical definition — an agent can tell this returns one digit for a given (n,k) rather than a full expansion — but there is no explicit statement of when to prefer it over the sibling factoradic/factoradic_decode tools, nor any when-not guidance. The scoping that does exist ('k runs from 0 to 20') is a validity constraint, 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