Skip to main content
Glama

Fermat Prime

fermat_prime
Read-onlyIdempotent

Whether the Fermat number 2^(2^n) + 1 is prime. n from 0 through 4 gives a prime. n=5 does not: 4294967297 = 641*6700417. n runs from 0 to 5. This checks the given n. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/fermat-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": "fermat_prime"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, open-world behavior. The description adds valuable operational context: x402 payment cost and an HTTPS endpoint, which an agent needs to invoke the paid tool correctly. It does not contradict the annotations.

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 core purpose is front-loaded, followed by range details and payment/endpoint information. There is minor repetition in restating the n range and 'This checks the given n,' but overall it is appropriately sized for a simple one-parameter tool.

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?

For a single-parameter, no-output-schema tool with annotations covering safety, the description provides enough context: formula, valid n range, known outcomes, cost, and endpoint. It could explicitly state that the return value is a boolean, but the phrase 'Whether ... is prime' makes that nearly unambiguous.

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?

Schema description coverage is 0%, so the description must carry parameter meaning. It does: n is defined as the exponent in 2^(2^n)+1, bounded from 0 to 5, with known primality outcomes for each valid n. The only gap is that return type is implied rather than explicitly stated.

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 the specific mathematical object and operation: checking whether the Fermat number 2^(2^n)+1 is prime for a given n. It is clear and distinguishable from a raw Fermat-number generator, though it does not explicitly call out the sibling fermat_number tool.

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?

The n range and known primality outcomes are stated, which implicitly defines valid usage. However, it does not say when this tool should be chosen over related tools such as fermat_number or prime_check, nor does it provide explicit exclusions beyond the n constraints.

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