Skip to main content
Glama

ScorpTech x402 Tools

Totient

totient
Read-onlyIdempotent

Euler totient phi(n), the count of integers from 1 to n that are coprime to n. phi(1) is 1. n = 0 is rejected. n runs up to 10^12. 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/totient

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, and the description adds materially new behavior: the $0.001 USDC x402 payment per successful call, the accepted chains (Base or Solana), an alternate HTTPS endpoint, the return shape (n, value), and the n=0 rejection. Cost and payment protocol are exactly the kind of pre-call context an agent needs and cannot get from 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 definition leads with the mathematical meaning, then bounds, then return shape, then price and endpoint — a sensible front-loaded order with no filler. The pricing and URL are appended in one dense final sentence, which is slightly crammed but each clause carries operational value.

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?

With no output schema, the description supplies the return shape (n, value), the domain limits, the error case, the payment model, and a fallback transport. For a single-parameter pure-computation tool, nothing an agent needs before calling 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?

Schema coverage is 0%, so the description must carry the parameter meaning, and it does: n is a positive integer up to 10^12, n=0 is rejected, and phi(1)=1. It usefully resolves the ambiguity created by the schema's minimum of 0 by clarifying that 0 is an error case.

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 exact mathematical function ('Euler totient phi(n), the count of integers from 1 to n that are coprime to n'), which is far more specific than the name 'totient' alone. It does not explicitly distinguish itself from siblings like jordan_totient or totient_sum, but the formula definition leaves little ambiguity about what is computed.

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 rather than stated: an agent can infer it should call this to compute phi(n) for a single n, and edge conditions (phi(1)=1, n=0 rejected) are given. There is no explicit when-to-use/when-not guidance or routing to alternatives such as totient_sum, so the guidance stops at implied.

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