Skip to main content
Glama
agentspan-ai

MCP Test Server

by agentspan-ai

math_factorial

Calculate the factorial (n!) of a non-negative integer. Returns an error for negative inputs.

Instructions

Return n factorial (n!). Returns an error if n is negative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A3.6/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 usefully discloses one trait beyond the schema: negative input returns an error. However, it says nothing about overflow/magnitude limits, return type beyond the output schema, or performance for large n, which are the meaningful behaviors for a factorial tool.

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?

Two short sentences, front-loaded with the core behavior and zero filler. Every clause carries information.

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 one-parameter pure function with an output schema, the description covers the essential contract: what it computes and the single error condition. Only edge-case magnitude behavior is left unaddressed, which is a minor gap.

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 0%, and the single parameter 'n' is documented only as type integer. The description partially compensates by implying n is the factorial input and that negative values are invalid, but it adds no domain/range or overflow guidance.

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?

States a specific verb ('Return') and resource ('n factorial'), with the mathematical notation n! removing any ambiguity. An agent can distinguish it from math_power or math_fibonacci without inspecting the schema.

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 statement of when to use this over sibling math tools, and no prerequisites beyond the implicit 'n must be an integer'. The only routing signal is the tool name itself.

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