Skip to main content
Glama

Prime Factorization

calculator_prime_factors
Read-only

Prime factors of n >= 2. format=power → 2^2 × 3 × 5; expanded → 2 × 2 × 3 × 5.

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": {
      "n": "<n>"
    },
    "name": "calculator_prime_factors"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYesInteger >= 2.
formatNopower or expanded.power

Output Schema

NameRequiredDescriptionDefault
nYes
resultYes
factorsYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already establish readOnly, non-destructive, closed-world behavior. The description adds the input-domain constraint n >= 2 and the output shape for each format mode, which is genuine added context. It does not describe error behavior for out-of-domain input, so a 3 is appropriate.

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?

Two short telegraphic fragments with zero waste and the input constraint front-loaded. Slight deduction because the opening is a fragment rather than a complete sentence, costing a little parseability.

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-parameter pure function with an output schema and full param coverage, the definition is nearly sufficient. It omits behavior for n < 2 and gives no routing against the sibling prime-check tool, leaving real gaps.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description goes slightly beyond by showing concrete rendered output for each enum value (2^2 × 3 × 5 vs 2 × 2 × 3 × 5), which the schema's terse 'power or expanded' does not convey.

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 the specific operation (prime factorization) and the input domain (n >= 2). It doesn't distinguish itself from the close sibling calculator_prime_check, which an agent could plausibly confuse with it, so it falls 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 choose this over calculator_prime_check, calculator_factor, or calculator_gcd. The reader is left to infer the use case entirely from the name.

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.