Skip to main content
Glama
IBM

MCP Math Server

by IBM

is_quadratic_residue

Determines if an integer is a quadratic residue modulo another integer, solving modular arithmetic problems in number theory.

Instructions

Check if a is a quadratic residue modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
nYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool's function but does not describe output format (e.g., boolean or detailed result), error handling (e.g., for invalid inputs like n ≤ 0), or performance characteristics. For a tool with no annotations, this leaves significant gaps in understanding how it behaves beyond the basic operation.

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 description is concise and front-loaded: the first sentence clearly states the tool's purpose, and the second adds domain/category context. There is no wasted text, and it efficiently conveys the essential information in two brief sentences, making it easy to scan and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a mathematical check with two parameters), no annotations, no output schema, and low schema coverage (0%), the description is incomplete. It lacks details on output format, error conditions, and mathematical nuances (e.g., handling of composite n). While it states the purpose, it does not provide enough context for reliable use without additional assumptions or trial-and-error.

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

Parameters2/5

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

The input schema has 0% description coverage, providing only types (integers) without explanations. The description mentions 'a' and 'n' in context ('Check if a is a quadratic residue modulo n'), which adds some meaning (e.g., 'a' is the number to check, 'n' is the modulus). However, it does not detail constraints (e.g., n must be positive), default values, or examples, failing to fully compensate for the low schema coverage.

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 clearly states the tool's purpose: 'Check if a is a quadratic residue modulo n.' It specifies the verb ('Check'), the mathematical operation ('quadratic residue'), and the parameters involved ('a' and 'n'). However, it does not explicitly differentiate from sibling tools like 'quadratic_residues' or 'legendre_symbol', which might offer related functionality, so it falls short of a perfect score.

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 provides minimal guidance: it includes a domain ('arithmetic') and category ('modular_arithmetic'), which gives some context. However, it does not specify when to use this tool versus alternatives (e.g., 'legendre_symbol' or 'quadratic_residues' among siblings), nor does it mention prerequisites or constraints. This lack of explicit usage instructions limits its helpfulness.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IBM/chuk-mcp-math-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server