Skip to main content
Glama
IBM

MCP Math Server

by IBM

lucas_lehmer_test

Test Mersenne numbers for primality using the Lucas-Lehmer algorithm to determine if 2^p - 1 is prime.

Instructions

Perform Lucas-Lehmer primality test for Mersenne numbers. (Domain: arithmetic, Category: special_primes)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pYes
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. It states the test is performed but does not disclose behavioral traits such as computational complexity, typical runtime, error handling (e.g., for non-prime 'p'), or output format. For a primality test tool with zero annotation coverage, this is a significant gap in transparency.

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, consisting of a single sentence that directly states the tool's purpose. The domain and category annotations are efficiently appended. There is no wasted verbiage, though it could benefit from additional context without sacrificing brevity.

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 of a primality test, lack of annotations, no output schema, and minimal parameter documentation, the description is incomplete. It does not explain what the test returns (e.g., boolean result, intermediate steps), performance considerations, or edge cases. For a tool with mathematical significance, more context is needed for effective 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?

The input schema has 1 parameter ('p') with 0% description coverage, and the tool description adds no parameter semantics. It does not explain what 'p' represents (e.g., exponent in 2^p - 1), valid ranges, or constraints (e.g., must be a prime integer). With low schema coverage, the description fails to compensate, leaving the parameter poorly documented.

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 clearly states the tool's purpose: 'Perform Lucas-Lehmer primality test for Mersenne numbers.' It specifies the exact mathematical test (Lucas-Lehmer primality test) and the target numbers (Mersenne numbers), which distinguishes it from sibling tools like 'aks_primality_test', 'fermat_primality_test', or 'is_mersenne_prime'. The domain and category annotations further clarify its niche in arithmetic/special primes.

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 no explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., that 'p' must be prime for Mersenne numbers), nor does it compare it to sibling tools like 'is_mersenne_prime' or general primality tests. The domain/category hints at context but lacks actionable usage rules.

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