Skip to main content
Glama

ScorpTech x402 Tools

Perfect Power

perfect_power
Read-onlyIdempotent

Whether n is a perfect power a^k with k at least 2. The base is the smallest such a, so the exponent is the largest. 16 is 2^4, 36 is 6^2, and 7 is not a perfect power. 0 and 1 use exponent 2. A leading zero is rejected. n has at most 80 digits. Returns JSON with: n, perfect, base, exp. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/perfect-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": "perfect_power"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover readOnly, idempotent, non-destructive and openWorld, so the bar is lower, yet the description adds substantial context: edge-case conventions (0 and 1 report exponent 2), input rejection rules (leading zero rejected, 80-digit cap), the canonicalization rule (smallest base ⇒ largest exponent), the exact return fields, and the metered cost/endpoint.

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 definition is front-loaded: predicate, canonicalization rule, examples, edge cases, then return shape and pricing. Every sentence carries information, though the closing price/HTTPS sentence is a dense run-on that could be split for readability.

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?

No output schema exists, but the description enumerates the returned fields (n, perfect, base, exp). Combined with the edge-case, input-validity and cost information, an agent has everything needed to call it correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single parameter is constrained only by a pattern, so the description must carry the burden — and it does, explaining that n is a decimal string of at most 80 digits, that 0 and 1 are valid inputs with exponent 2, and that leading zeros are rejected even though the regex would admit them.

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?

"Whether n is a perfect power a^k with k at least 2" states a specific verb and mathematical predicate. The examples (16 = 2^4, 36 = 6^2, 7 is not) and the canonical-base rule make the semantics unambiguous even against siblings like perfect_check or prime_power.

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 precise definition: an agent knows to call it when it needs a perfect-power test with a canonical base/exponent. However, it never says when to prefer this over sibling predicates such as perfect_check or prime_power, nor does it state the payment prerequisite as a precondition for calling.

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