Skip to main content
Glama
IBM

MCP Math Server

by IBM

is_twin_prime

Determine if a given integer forms a twin prime pair with its neighbor two units away. This mathematical tool verifies whether both the number and the number plus two are prime numbers.

Instructions

Check if a number is part of a twin prime pair (p, p+2). (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 of behavioral disclosure. It states the tool checks for twin prime pairs but does not describe the return value (e.g., boolean or detailed result), error handling for non-integer inputs, or performance considerations. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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 highly concise and front-loaded, consisting of a single sentence that directly states the tool's purpose and includes domain/category tags. There is no wasted text, and every part of the sentence contributes essential information, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and parameter semantics but lacks details on behavioral aspects like return values or error handling. For a simple tool, this is minimally viable but leaves room for improvement in providing a fuller context.

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?

The input schema has one parameter 'p' with 0% description coverage, but the description adds meaningful context by explaining that 'p' is the number to check as part of a twin prime pair (p, p+2). This clarifies the parameter's role beyond the schema's type information, compensating well for the lack of schema descriptions.

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 explicitly states the tool's purpose: 'Check if a number is part of a twin prime pair (p, p+2).' It uses a specific verb ('Check'), identifies the resource ('a number'), and defines the mathematical concept ('twin prime pair'), clearly distinguishing it from sibling tools like 'is_prime' or 'twin_prime_pairs'.

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 description implies usage by specifying the domain ('arithmetic') and category ('special_primes'), which suggests it's for mathematical contexts involving prime numbers. However, it does not explicitly state when to use this tool versus alternatives like 'is_prime' or 'twin_prime_pairs', nor does it provide exclusions or prerequisites, leaving the guidance somewhat implicit.

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