Skip to main content
Glama

Descriptive Statistics Calculator

calculate_descriptive_statistics
Read-onlyIdempotent

Use this when you have a set of numeric observations and need its central tendency, spread or quartiles, e.g. the standard deviation of a data set. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when you need a single percentile or the percentile rank of one value (use percentile), a standardised score (use z-score), or statistics of two paired variables (use correlation or linear-regression). What it computes: Computes summary statistics for a list of numbers: count, sum, mean, median, mode, range, sample and population variance and standard deviation, standard error, coefficient of variation, quartiles (linear interpolation) and skewness. Inputs: values (number_list). Complete JSON argument examples: {"values":[2,4,4,4,5,5,7,9]} | {"values":[4,8,15,16,23,42]} Outputs: count, sum, mean, median, mode, mode_count, min, max, range, sample_variance, sample_std_dev, population_variance, population_std_dev, standard_error, coefficient_of_variation_percent [%], q1, q3, iqr, skewness. Formula: mean = Σx / n; sample_variance = Σ(x − mean)² / (n − 1); population_variance = Σ(x − mean)² / n; standard_error = s / √n; CV% = 100·s / mean; quartile at p: rank = p·(n − 1), value = x(⌊rank⌋) + (rank − ⌊rank⌋)·(x(⌊rank⌋+1) − x(⌊rank⌋)) on sorted data; skewness G1 = n / ((n − 1)(n − 2)) · Σ((x − mean) / s)³ Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/descriptive-statistics with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/statistics/descriptive-statistics.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYesThe data set, as a list of numbers (comma-separated or JSON array). At least 2 values are needed for sample statistics.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / values / maxItems
      Added value: +10000
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "values": [
      +      2,
      +      4,
      +      4,
      +      4,
      +      5,
      +      5,
      +      7,
      +      9
      +    ]
      +  },
      +  {
      +    "values": [
      +      4,
      +      8,
      +      15,
      +      16,
      +      23,
      +      42
      +    ]
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so safety is covered. The description adds substantial behavioral context: it lists all computed outputs, specifies the quartile interpolation method, gives the formulas for variance and skewness, and instructs the agent to call the tool directly rather than answer from memory or stop at discovery. No contradiction with 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?

The description is front-loaded with the usage guidelines, then structured into 'What it computes', 'Inputs', 'Outputs', 'Formula', and 'Direct REST fallback'. It is longer than strictly necessary—the formulas are useful for transparency but not required for invocation. Nevertheless, every section has a clear role and nothing is wasted, so it earns a 4.

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?

With only one parameter and a rich output schema already provided, the description is complete for correct invocation. It includes complete JSON examples, the full list of output fields, the interpolation method, and even a direct REST fallback endpoint. There is nothing an agent needs to call this tool that is missing.

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 coverage is 100%: the values parameter has a clear description ('The data set, as a list of numbers... At least 2 values are needed for sample statistics') and examples. The description merely restates 'values (number_list)' and provides JSON examples, adding little beyond what the schema already documents. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'computes summary statistics for a list of numbers: count, sum, mean, median, mode...' This clearly identifies what the tool does. It also distinguishes itself from siblings by explicitly naming the alternatives for percentiles, z-scores, and paired-variable statistics, so an agent can tell it apart without opening the schemas.

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?

The description explicitly states when to use it ('Use this when you have a set of numeric observations and need its central tendency, spread or quartiles') and when not to use it ('Do not use this when you need a single percentile... use percentile, a standardised score... use z-score, or statistics of two paired variables... use correlation or linear-regression'). This is a clear, actionable routing guideline.

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.

Resources