Skip to main content
Glama

factorial

Calculate the product of integers from 1 to n, with progress reporting for long runs. Use it for combinatorics, probability, and recursion tasks.

Instructions

Calculate factorial of n with progress reporting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose one useful trait beyond the schema — 'with progress reporting' — which hints at a long-running/interactive operation. However, it omits critical behavior for factorial: domain constraints on n, overflow behavior, and what the progress reporting actually looks like.

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 efficient sentence with the action front-loaded and no wasted verbiage. Nothing redundant is included.

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?

An output schema exists, so return values need not be explained, and one parameter is trivially discoverable. Still, for a numeric unary function the description should mention domain restrictions and any limits on n, which it does not.

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

Parameters2/5

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

Schema description coverage is 0% and the description only restates the parameter name ('of n') without adding meaning. For factorial, the sign and range of n are semantically critical, and neither the schema nor the description address them.

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+resource ('Calculate factorial of n'), which is unambiguous and clearly distinct from the arithmetic siblings like multiply or power. It lacks any explicit sibling differentiation, but the operation is inherently self-identifying.

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 guidance on when to prefer this over alternatives (e.g. multiply loops) and no stated preconditions, such as n needing to be a non-negative integer or practical size limits. The agent is left to infer usage entirely.

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