Skip to main content
Glama

ScorpTech x402 Tools

Prime Power

prime_power
Read-onlyIdempotent

If n is a prime power p^k with k at least 1, return that prime and the exponent. Otherwise the prime and the exponent are 0. 8 is 2^3, 49 is 7^2, and 12 is not a prime power. n runs from 1 to 1000000000000. Returns JSON with: n, prime, exp, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/prime-power

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_power"
  }
}

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 cover the safety profile (readOnly, idempotent, non-destructive), and the description adds materially beyond them: per-call pricing ($0.001 USDC via x402 on Base or Solana), a concrete HTTPS endpoint, and the exact JSON fields returned. It stops short of describing failure or payment-error behavior, so it is strong but not exhaustive.

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 contract and examples come first, followed by output shape and then commercial/transport details, so the important content is front-loaded. The pricing and URL sentences are dense but genuinely useful; there is little wasted wording.

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 steps in to enumerate the returned fields (n, prime, exp, value) and pins the input domain, pricing model, and alternate transport. For a single-parameter pure function this is close to complete, with only edge-case and error semantics left unstated.

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 meaning of n — and it does, by defining the valid domain (1 to 10^12) and illustrating the semantics with worked examples of hits and misses. It could be sharper about whether 1 counts as a prime power, but the 'k at least 1' clause resolves that implicitly.

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 names a precise mathematical operation on a named resource: return the prime p and exponent k such that n = p^k, with concrete examples (8 = 2^3, 49 = 7^2, 12 is not). That verb-plus-resource specificity clearly separates it from siblings like prime_check or perfect_power without needing their schemas.

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 outcome contract (returns 0/0 when n is not a prime power), so an agent can infer what happens on a miss, but the description never says when to prefer this over prime_check, perfect_power, or largest_prime_factor, and gives no exclusions or prerequisite context. Adequate, but routing is left to inference.

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