Skip to main content
Glama

sieve_of_eratosthenes

Generate every prime number up to a given upper bound using the Sieve of Eratosthenes algorithm, ideal for fast primality listing and number theory tasks.

Instructions

Generate all prime numbers up to N using the Sieve of Eratosthenes algorithm.

Input Schema

NameRequiredDescriptionDefault
nYesUpper bound (inclusive), must be >= 2 and <= 10,000,000

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 burden. Naming the Sieve of Eratosthenes conveys a deterministic, exact computation with characteristic time/memory behavior, which is genuine behavioral context. However, it says nothing about performance at the 10M bound, output format, or memory 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, tightly written sentence that front-loads the operation and scope. Every clause earns its place with no padding.

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?

With no output schema or annotations, the description does state the return content (all primes up to N) and the parameter constraints live in the schema. It is largely complete for a single-parameter tool, though it could note the output format.

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 n's inclusive upper bound and its 2-to-10,000,000 range. The description only restates N as an upper bound and adds no syntax or format meaning. 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?

The description states a specific verb (Generate) and resource (all prime numbers up to N) and even names the algorithm used. An agent can distinguish it from sibling primality tools like prime_check or prime_factor. Sibling differentiation is implicit rather than explicit, keeping it short of a 5.

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 versus alternatives such as prime_check (single number) or prime_factor (factorization). The description only says what it does, not when it is the right choice or any prerequisites.

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