Skip to main content
Glama

ScorpTech x402 Tools

Factorial Prime

factorial_prime
Read-onlyIdempotent

Whether n! + 1 and n! - 1 are prime. Both are prime for n=3. For n=11, only n! + 1 is prime. For n=12, only n! - 1 is prime. n! - 1 is not prime for n=0 or 1. n runs from 0 to 12. Returns JSON with: n, plus, minus. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/factorial-prime

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/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), but the description adds material facts they do not: a per-call price of $0.001 USDC via x402 on Base or Solana, and an equivalent HTTPS endpoint. The response shape ('Returns JSON with: n, plus, minus') is also disclosed. It omits what happens on an out-of-range n, which the schema caps rather than the description.

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

Conciseness3/5

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

Purpose and range are front-loaded, which is good. The middle of the description is a list of specific trivia cases (n=3, 11, 12) that illustrate behavior but read like documentation padding; the pricing and endpoint are appended after the value proposition should already be closed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does supply the returned keys, and it covers the payment/auth requirement that would otherwise blindside an agent, which is the main risk for this tool. It would be complete at 5 if it stated the types of 'plus'/'minus' and the out-of-range failure mode.

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 the parameter alone; it adds the valid domain ('n runs from 0 to 12') and semantic edge cases at n=0 and 1. However, the domain duplicates the schema's minimum/maximum, and the description never states that n is the integer whose factorial's neighbors are tested. Partial compensation, not full.

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 names a precise computation: primality of n!+1 and n!-1, with a concrete worked example ('Both are prime for n=3'). An agent can distinguish this from alt_factorial or prime_check on the resource alone. It never names or contrasts a sibling, though, so it stops short of 5.

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 stated domain restriction ('n runs from 0 to 12') and by the edge-case notes (n=0, 1), which implicitly tell the agent when the result is degenerate. There is no explicit when-to-use vs. alternatives guidance, e.g. no direction to prime_check for a single value or factorial_mod for modular variants.

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