Skip to main content
Glama

miller_rabin_test

Test if a number is prime with a deterministic Miller-Rabin primality check using multiple witnesses, for values up to 10^18.

Instructions

Test whether a number is prime using the deterministic Miller-Rabin primality test with multiple witnesses.

Input Schema

NameRequiredDescriptionDefault
numberYesThe number to test for primality (up to 10^18)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that the test is deterministic with multiple witnesses, implying no probabilistic false positives in the supported range. However, it does not describe the return format (boolean), error behavior, or performance characteristics.

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?

A single, front-loaded sentence with no wasted words. The core action and algorithm are stated immediately.

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 simple one-parameter predicate tool with a fully documented schema and no output schema, the description is nearly complete. The only minor gap is that it does not explicitly state the return value (true/false), though that is strongly implied by 'Test whether a number is prime.'

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents the single 'number' parameter, including its 10^18 upper bound. The description adds no parameter-specific syntax or constraints beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb ('Test') and resource ('whether a number is prime') and names the algorithm. It does not distinguish itself from sibling tools like prime_check or sieve_of_eratosthenes, so an agent cannot tell which primality tool to pick without inspecting schemas.

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 guidance on when to use this tool versus alternatives. There is no mention of prime_check, sieve_of_eratosthenes, or the conditions (e.g., very large numbers) that would make this the right choice.

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

Deploy Server

Other Tools