Skip to main content
Glama
IBM

MCP Math Server

by IBM

legendre_symbol

Compute the Legendre symbol (a/p) to determine quadratic residue properties for prime modulus p in modular arithmetic.

Instructions

Compute Legendre symbol (a/p) for prime p. (Domain: arithmetic, Category: modular_arithmetic)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
pYes
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool computes but doesn't disclose behavioral traits like error handling for non-prime p, performance characteristics, return format, or mathematical conventions (e.g., standard Legendre symbol values of -1, 0, 1). The domain/category tags add minimal context.

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?

Extremely concise with zero wasted words. The single sentence directly states the computation, and the domain/category tags are efficiently appended. Every element earns its place without redundancy.

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?

For a mathematical tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on return values, error conditions, mathematical assumptions, and how it relates to sibling tools like jacobi_symbol or is_quadratic_residue, making it inadequate for reliable use.

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?

Schema description coverage is 0%, so the description must compensate. It names the parameters (a and p) and specifies p must be prime, which adds meaning beyond the schema's integer types. However, it doesn't explain what a represents (integer modulo p) or constraints like p > 0, leaving significant gaps.

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 computes the Legendre symbol (a/p) for prime p, specifying both the mathematical operation and domain/category. It distinguishes itself from siblings like jacobi_symbol by explicitly mentioning 'prime p', but doesn't contrast with other modular arithmetic tools like is_quadratic_residue or tonelli_shanks.

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?

No explicit guidance on when to use this tool versus alternatives. The description mentions the domain and category but doesn't provide context about when Legendre symbols are needed versus other modular arithmetic operations, nor does it mention prerequisites like p being prime (though implied).

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