Skip to main content
Glama

ScorpTech x402 Tools

Alt Factorial

alt_factorial
Read-onlyIdempotent

The alternating factorial af(n) = n! - (n-1)! + (n-2)! - ... ending at 1. af(1) is 1, af(3) is 5, and af(4) is 19. n runs from 1 to 200. Past 15 digits the value is a decimal string. Returns JSON with: n, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/alt-factorial

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses the paid-call model ($0.001 USDC per successful call via x402 on Base or Solana), an equivalent HTTPS endpoint, the JSON return shape (n, value), and the important behavioral rule that results past 15 digits come back as a decimal string. These are exactly the traits an agent cannot infer from structured fields.

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 examples, then range, output shape, price, and endpoint in a compact sequence. Only the '1 to 200' range mildly duplicates the schema bounds; otherwise every sentence carries information.

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 usefully supplies the return fields and the decimal-string behavior for large values, plus cost and transport details. It stops short of specifying error behavior for out-of-range or non-integer n and how many digits the decimal string carries, but is otherwise complete for a single-parameter calculator.

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 description coverage is 0%, so the description carries the burden. It states 'n runs from 1 to 200', which largely restates the schema's minimum/maximum, but the formula context makes clear that n is the term index of the alternating factorial. It adds modest meaning, not deep parameter guidance.

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 the exact mathematical definition (af(n) = n! - (n-1)! + ...), worked examples (af(1)=1, af(3)=5, af(4)=19), and the domain 1..200, so an agent knows precisely what is computed. It does not distinguish itself from the very similarly named sibling 'alternating_factorial', which is the only real clarity gap.

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: the function definition and the n range signal when the tool is applicable, but there is no explicit when-to-use/when-not statement and no pointer to alternatives such as 'alternating_factorial' or 'factorial_prime'. For a single-purpose math tool this is adequate but thin.

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