Skip to main content
Glama

ScorpTech x402 Tools

Prime Count

prime_count
Read-onlyIdempotent

pi(n), the number of primes less than or equal to n. pi(0) and pi(1) are 0, pi(10) is 4, pi(100) is 25, and pi(10000000) is 664579. n runs from 0 to 10000000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/prime-count

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, so the bar is lower. The description adds genuinely new context: the valid input domain (0 to 10,000,000), the $0.001 USDC x402 payment requirement per successful call, and an equivalent HTTPS endpoint. It does not describe error behavior for out-of-range n, which is minor.

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 definition is front-loaded in one sentence, followed by examples, bounds, and access details. The example list is slightly long but each value anchors a different scale of n, so the space is largely earned.

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 pure-math tool with no output schema, the description supplies definition, bounds, illustrative outputs, pricing, and an alternate transport. What remains unstated (return type, out-of-range handling) is readily inferred or covered by annotations.

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 coverage is 0%, so the description must carry the burden. It states the domain of n ('runs from 0 to 10000000', matching the schema bounds) and, more usefully, clarifies the output semantics through examples like pi(0)=0 and pi(10000000)=664579, which the bare schema does not convey.

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?

The description gives a specific name (pi(n)), a precise mathematical definition ('number of primes less than or equal to n'), and worked examples (pi(10)=4, pi(100)=25). An agent can immediately distinguish this counting function from siblings like prime_nth or next_prime.

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 definition implies when the tool applies, but it never names alternatives such as prime_nth (for the nth prime) or prime_check (for primality), nor does it say when not to use it. Usage is inferable from the math, not stated.

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