Skip to main content
Glama

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. Price: $0.001 USDC per successful call (x402, 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/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive operation. The description adds useful behavioral context beyond annotations: n=0 is rejected, phi(1)=1, n is capped at 10^12, and calls are paid at $0.001 USDC per successful call via x402 on Solana.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loads the mathematical definition before edge cases, range, and payment details. Every sentence provides useful information for invoking or understanding the tool.

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?

For a simple one-parameter mathematical function with no output schema, the description is complete: it defines the return concept as a count, covers edge cases, states the input range, and discloses payment mechanics. Annotations already cover safety and idempotency.

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 clarify the single parameter. It does so meaningfully by stating that n=0 is rejected even though the schema minimum is 0, that phi(1)=1, and that n goes up to 10^12.

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 states a precise mathematical operation: Euler's totient phi(n), defined as the count of integers from 1 to n coprime to n. This is a specific resource and computation, but it does not differentiate the tool from siblings such as totient_sum, cototient, or jordan_totient.

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 is appropriate, and it notes that n=0 is rejected, but it gives no explicit alternative selection guidance among the many totient-related siblings. An agent can infer usage from the math definition, but must still determine on its own when to use this versus totient_sum or cototient.

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