Skip to main content
Glama

UK Data: Maths and statistics

is_prime

Read-onlyIdempotent

Checks if a positive integer is a prime number (only divisible by 1 and itself). Returns false for numbers less than 2. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numNointeger, required, the number to test for primality, no units, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already establish that this is a read-only, idempotent, non-destructive operation. Beyond that, the description adds useful behavior: it returns false for numbers less than 2 and costs 1 credit.

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 definition is front-loaded in one clear sentence, with the edge case and cost placed compactly in parentheses. There is no unnecessary wording.

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 one-parameter boolean predicate with no output schema, this is largely complete: purpose, definition, edge case, and cost are covered. It could be slightly more explicit that the normal return is true/false, but that is strongly implied.

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?

Schema coverage is 100%, so the single parameter is already documented. The description adds semantic domain information by specifying that the input is a positive integer and clarifying the less-than-2 edge case.

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 gives a specific verb and resource: checks whether a positive integer is prime, and even defines primality. It is unambiguous against math siblings such as is_perfect_square or is_power because the operation is exactly primality testing.

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

Usage Guidelines4/5

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

The context is clear: use this to test primality. It also states the boundary behavior for numbers less than 2, which helps an agent decide when the tool applies, though it does not explicitly name alternatives or exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources