Skip to main content
Glama

Sieve primes in a range

bpj_discrete_prime_sieve
Read-onlyIdempotent

Use a segmented sieve to find primes within an inclusive interval of up to 1,000 integers.

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": {
      "first": "<first>",
      "last": "<last>"
    },
    "name": "bpj_discrete_prime_sieve"
  }
}

Input Schema

NameRequiredDescriptionDefault
lastYes
firstYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds a real behavioral constraint the annotations do not: the interval is capped at 1,000 integers — notably tighter than the schema's per-endpoint range of 0 to 100,000,000, so this is the only place the agent learns of the effective limit.

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?

A single front-loaded sentence with no filler; both the action and the size constraint are stated immediately. Brevity is appropriate for a two-parameter tool, though one more clause on the returned value would not have been waste.

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 simple two-integer tool with no output schema, the description covers the action and the size cap but says nothing about the return shape (list of primes? empty result?) or what happens at the 1,000-integer boundary. Enough to invoke, not enough to predict the result confidently.

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 0%, so the description carries the burden. It clarifies that the two endpoints define an inclusive interval ('first' and 'last' both included), which is meaningful, but adds nothing on bounds ordering, error behavior when first > last, or how an oversized range is rejected.

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 and resource ('find primes within an inclusive interval') and names the technique ('segmented sieve'). This clearly separates it from the sibling factorization tool bpj_discrete_prime_factors, though the description never explicitly names that sibling.

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 'up to 1,000 integers' clause implicitly tells the agent the valid operating envelope, which is usable guidance. However, there is no explicit when-to-use vs. when-not, and no mention of the prime_factors alternative for numbers outside a range.

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.