Skip to main content
Glama

Statistical Analysis

calc_statistics
Read-onlyIdempotent

Calculate mean, median, mode, standard deviation, or variance for a list of numbers. Provides descriptive statistics for data analysis.

Instructions

Perform statistical calculations on a list of numbers.

Available operations: mean, median, mode, std_dev, variance

Note: Use this tool to compute descriptive statistics over a list of numbers. To evaluate a single mathematical expression, use the calculate tool instead.

Examples: statistics([1.0, 2.5, 3.0, 4.5, 5.0], "mean") # Returns 3.2 statistics([1.0, 2.5, 3.0, 4.5, 5.0], "std_dev") # Returns ~1.58

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numbersYesList of numbers to compute descriptive statistics on. Example: [1.0, 2.5, 3.0, 4.5, 5.0]
operationYesStatistical operation to perform. Allowed values: mean, median, mode, std_dev, variance

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
resultYes
operationYes
difficultyYes
sample_sizeYes
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint. Description adds the list of operations and example return values, providing useful context beyond annotations.

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?

Description is concise with a clear structure: purpose, operations list, usage note, examples. No extraneous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-param tool with 100% schema coverage and an output schema, the description fully covers purpose, usage, and examples. No gaps.

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 covers both parameters 100% with descriptions and examples. Description repeats the operations list and provides example call, adding modest value.

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 clearly states 'Perform statistical calculations on a list of numbers', specifying the verb and resource. It distinguishes from siblings by referencing the 'calculate' tool for single expressions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use: 'compute descriptive statistics over a list of numbers', and when not: 'to evaluate a single mathematical expression, use the calculate tool instead.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clouatre-labs/math-mcp-learning-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server