Skip to main content
Glama

factorial

Compute the product of all positive integers up to a given non-negative integer. Enter a whole number to get its exact result.

Instructions

Calculate the factorial of a non-negative integer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It clearly states the operation and the valid input domain, but it omits edge-case behavior such as 0! = 1, error handling for negative numbers, and behavior for very large integers.

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?

The description is a single, front-loaded sentence with no filler. Every word contributes meaning: the operation and the input constraint are both immediately clear.

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?

For a simple, pure mathematical function with an output schema present, the description covers the essential input constraint and operation. It is slightly incomplete in not mentioning the 0! edge case, but this is a minor gap.

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?

The schema provides no description for the single 'number' parameter, and the generic parameter name adds little. The description compensates by specifying that the value must be a non-negative integer, which is the key semantic requirement for calling this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Calculate') with a clear resource ('factorial') and a precise domain constraint ('non-negative integer'). It fully distinguishes this tool from the sibling math operations by naming the exact operation.

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 is provided about when to choose this tool over alternatives, nor any exclusions or edge cases. The intended usage is implied only by the tool's name and the description, not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.