Skip to main content
Glama

euler_totient

Calculate Euler's totient function to count integers up to n that are coprime with n, useful for number theory and cryptography tasks.

Instructions

Compute Euler's totient function phi(n) - the count of integers up to n that are coprime with n.

Input Schema

NameRequiredDescriptionDefault
numberYesPositive integer to compute totient for

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the burden of behavioral disclosure. It accurately describes the mathematical operation, but does not state that it is a pure read-only calculation, what type it returns, or how edge cases such as n=1 are handled.

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 a single front-loaded sentence with no filler. Every clause contributes to defining the function.

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 simple pure mathematical function with a fully described input parameter, the description is nearly sufficient. It could explicitly state that the result is a non-negative integer, but the term 'count' strongly implies this.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameter is already documented as a positive integer. The description's mention of phi(n) and the coprime count adds mathematical context but no additional constraints or formatting details beyond the schema.

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 states a specific verb (Compute) and a specific mathematical resource (Euler's totient function phi(n)), then defines the function precisely. This uniquely identifies the tool among number-theory siblings such as prime_check or moebius_function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance about when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. It only states what the tool computes, leaving usage entirely to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools