Skip to main content
Glama

Calc Stats

calc_stats
Read-onlyIdempotent

Calculate mean, median, sample standard deviation, and coefficient of variation for a numeric sample. Identify run-to-run noise when CV exceeds 0.2.

Instructions

Mean, median, sample stdev, and coefficient of variation (CV) for a sample of numbers. Pairs with percentiles for distribution shape (p50/p90/p95/p99) on the same sample, and with benchmark or verify_optimization, which are common sources of the timing samples this tool summarizes. CV > 0.2 flags run-to-run noise that swamps the effect. Returns n/mean/median/stdev/cv plus a cv_note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numsYesSample of numbers to summarize (mean, median, sample stdev, coefficient of variation)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • addedInput schema / properties / nums / description
      Added value: +"Sample of numbers to summarize (mean, median, sample stdev, coefficient of variation)"
  2. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "calc_statsDictOutput",
      +  "type": "object"
      +}
  3. Changed4 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / nums / title
      Added value: +"Nums"
    • addedInput schema / title
      Added value: +"calc_statsArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  4. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds meaningful behavior beyond that: it specifies sample stdev (not population), states that CV > 0.2 flags run-to-run noise, and discloses the return shape including n/mean/median/stdev/cv plus cv_note. No contradictions 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences each earn their place: the first states the core statistics, the second positions the tool within the sibling family and common data sources, and the third gives the interpretation rule and return fields. No filler or repetition.

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 one simple parameter, full schema coverage, rich annotations, and an output schema present, the description's detail is appropriately matched. It explains the tool's role, its interpretation, and its return value sufficiently for correct invocation. Nothing essential 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 description coverage is 100%, so the schema already documents the nums parameter as 'Sample of numbers to summarize (mean, median, sample stdev, coefficient of variation)'. The description adds no new parameter-level meaning beyond what the schema states, falling to the baseline for fully covered schemas.

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 the exact computed quantities: mean, median, sample stdev, and coefficient of variation for a sample of numbers. It clearly identifies the resource (a numeric sample) and operation, and implicitly distinguishes from sibling percentiles by describing itself as a complement, not a duplicate.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: it pairs with percentiles for distribution shape and summarizes timing samples commonly sourced from benchmark or verify_optimization. It stops short of explicitly listing exclusions or a 'when not to use' rule, but the role is unambiguous.

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