Skip to main content
Glama

prime

Test whether a number is prime and list primes in a range. Pure CPU, instant.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "number": "<number>"
    },
    "name": "prime"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRange size
numberYesNumber to test

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Range size",
      +  "type": "integer"
      +}
    • addedInput schema / properties / number
      Added value: +{
      +  "description": "Number to test",
      +  "type": "integer"
      +}
    • addedInput schema / required
      Added value: +[
      +  "number"
      +]
  4. Added

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden, and it discloses only that the tool is 'Pure CPU, instant' — useful for knowing there are no auth, network, or rate-limit concerns. It says nothing about what is returned (a boolean? a list?), how 'number' and 'limit' interact, or how edge cases like 0, 1, and negatives are handled, which are the real ambiguities for a primality tool.

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?

Two short sentences, capability stated first, with the performance note appended where it costs nothing. Every clause carries information and nothing is padded.

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?

For a two-parameter tool with no annotations and no output schema, the description should at minimum state the return shape and the relationship between the two parameters. It covers the safety/performance profile but leaves the agent guessing what a call actually yields, so it is adequate but with a clear gap.

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 documents both parameters and the baseline is 3. The description adds the notion that 'limit' relates to listing primes in a range, slightly enriching the terse 'Range size' schema text, but it does not resolve whether the range starts at 'number' or at 2.

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?

Uses a specific verb and resource ('test whether a number is prime') and names a second capability ('list primes in a range'), which distinguishes it from math siblings like factorial, fibonacci, and gcd_lcm. The only weakness is that it never clarifies how a single 'number' parameter plus a 'limit' produces a range, so the dual-mode purpose is clear but its mechanics are not.

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?

There is no explicit when-to-use guidance, no statement of when the range-listing mode applies versus the single-number test, and no alternatives named among the many numeric siblings. The two clauses hint at two modes but leave the agent to infer which parameter combination triggers which.

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