Skip to main content
Glama

Agent Data Tools: Utilities

Statistics of numbers: mean, median, standard deviation, percentiles

math_stats
Read-only

Descriptive statistics for a list of numbers: count, sum, mean, median, mode, min, max, range, population and sample variance and standard deviation, quartiles with IQR, and the 90th, 95th and 99th percentiles (linear interpolation). Up to 10,000 numbers, comma or space separated. Use to summarise measurements, latencies, prices or scores without a spreadsheet. Example: values=12, 15, 15, 18, 21, 24, 30, 45. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "values": "<values>"
    },
    "name": "math_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesNumbers separated by commas, spaces or new lines

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive/openWorld, but the description adds real behavioral context beyond them: a 10,000-number input cap, linear interpolation for percentiles, per-call pricing via x402 USDC or a card key, first 10 free, failed calls free, and that repeats are charged. This is consistent with idempotentHint=false and is exactly the kind of cost/repeat information annotations cannot convey.

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?

Front-loaded with the capability list, then limits, then usage example, then cost/behavior. Dense but every clause carries information; the pricing sentence is the longest but covers cost and repeat-charge behavior an agent needs before calling.

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?

There is no output schema, and the description compensates by enumerating all returned statistics (count, sum, mean, median, mode, min, max, range, variances, std devs, quartiles/IQR, percentiles) plus input format, size limit, and cost. Nothing material is missing for a single-parameter compute tool.

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

Parameters4/5

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

Schema coverage is 100% and documents the single 'values' parameter, so the baseline is already met. The description still adds the 10,000-item limit and a worked example showing the comma-separated format, which the schema's 'commas, spaces or new lines' note does not quantify.

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 (compute descriptive statistics) and resource (a list of numbers), then enumerates exactly which statistics are returned. An agent can distinguish it from math_evaluate (expression evaluation) or text_stats (text corpora) without opening 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 Guidelines4/5

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

"Use to summarise measurements, latencies, prices or scores without a spreadsheet" gives concrete usage contexts and an example call. It stops short of naming alternatives or exclusion cases (e.g., use text_stats for text, math_evaluate for arbitrary expressions).

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