Skip to main content
Glama

Factor an integer

bpj_discrete_prime_factors
Read-onlyIdempotent

Factor a positive integer up to one billion into prime powers.

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": {
      "a": "<a>"
    },
    "name": "bpj_discrete_prime_factors"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, closed-world and non-destructive, so the safety profile is fully covered. The description adds essentially nothing beyond that: the one-billion limit is already encoded in the schema maximum/minimum, and there is no disclosure of the result shape, factor ordering, or how repeated primes are represented.

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?

One front-loaded sentence with no filler or redundancy. It is efficient, though the terseness comes at the cost of some structure that could have carried output-format details.

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?

With no output schema, the description should say what comes back — e.g., whether factors are returned as prime/exponent pairs or a flat list. Annotations cover the safety side and the input bound is clear, but the return-value gap leaves this adequate rather than complete for a math utility.

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 0% and the single parameter is only titled "Integer A", so the description carries real weight by explaining that it is the positive integer to be factored and that it must be at most one billion. That fully accounts for the sole parameter, though it does not restate the minimum of 1 explicitly as a lower bound on the input.

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 ("Factor ... into prime powers") plus the domain bound of one billion, which is enough to distinguish it from siblings like bpj_discrete_prime_sieve or bpj_discrete_integer_partitions. It stops short of explicitly naming the sibling it differs from, so it lands at 4 rather than 5.

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?

Usage is only implied by the verb: an agent can infer this is the tool for prime factorization, and the one-billion restriction acts as a precondition. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as the sieve for primality testing.

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.