Skip to main content
Glama

ScorpTech x402 Tools

Double Factorial

double_factorial
Read-onlyIdempotent

The double factorial n!!. Even n uses the even factors down to 2, and odd n uses the odd factors down to 1. 0!! is 1, 6!! is 48, and 7!! is 105. n runs from 0 to 4096. 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/double-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": "double_factorial"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already cover safety traits like readOnly and idempotent, and the description adds useful behavioral context beyond them: output JSON shape, the threshold where the value becomes a decimal string, the allowed n range, and the payment/endpoint details. It does not describe error behavior or latency, but adds substantial value.

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 description is front-loaded with the core definition and examples, then moves to output format and pricing. It is compact and avoids repetition, though the pricing and endpoint sentence is somewhat extraneous to the mathematical operation.

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 single-parameter mathematical tool with no output schema, the description covers definition, edge cases, valid range, output format, and invocation details. Nothing essential for correct invocation 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?

The input schema has 0% description coverage, so the description must compensate. It does so by defining what n means, its valid range (0 to 4096), and how even/odd n affect the computation, plus concrete examples.

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 clearly states the specific operation: computing the double factorial n!!, with a precise definition for even and odd n. It does not explicitly distinguish this from sibling factorial-related tools, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the mathematical semantics and valid range, but gives no guidance on when to use this tool versus the many sibling factorial tools. It also does not state any exclusions or alternatives.

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