Skip to main content
Glama

prime_factor

Computes the prime factorization of an integer from 2 up to 1 trillion, breaking it into its prime factors.

Instructions

Find the prime factorization of an integer.

Input Schema

NameRequiredDescriptionDefault
nYesInteger to factorize (>= 2, max 1 trillion).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but adds nothing beyond the one-line purpose. It does not say what the output looks like (list of primes, primes with multiplicities, canonical form), whether repeated factors are returned, or how the >1e12 / <2 bounds are enforced.

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. It is efficient, but its brevity is a function of under-specification rather than tight writing, so it is not a standout.

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?

The tool is simple (one param, no nested objects, no output schema), so minimal prose is defensible. Still, for a factorization function the shape of the result (e.g., factors with multiplicity) is a real ambiguity the description does not resolve.

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% and the single parameter n already documents type and the >= 2, max 1 trillion constraints, so the schema does the heavy lifting. The description restates "integer" without adding format or edge-case semantics beyond that. 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 and resource ("Find the prime factorization of an integer"), so the core purpose is unambiguous. However, it offers no differentiation from related math siblings such as prime_check, pollard_rho, sieve_of_eratosthenes, or duval_factorize, which an agent may need to choose between.

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 when-to-use guidance and no exclusions. A factorization tool sits next to prime_check (primality) and duval_factorize, yet the description never specifies which to pick when, leaving routing entirely to the agent.

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