Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Statistics calculator: mean, median, standard deviation, quartiles and percentiles

statistics_calculate
Read-onlyIdempotent

Statistics calculator for a numeric array in one call: count, sum, mean, median, mode, variance and standard deviation honouring ddof (default 1, the sample form; 0 gives the population form) plus always-population *_population fields, min, max, range, the quartiles and interquartile range, skewness, kurtosis, and any requested percentiles. Percentiles use a named interpolation method so the result is reproducible rather than implementation-defined. Price: $0.05 per successful call, paid over x402 (USDC on Base).

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": "statistics_calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
ddofNoDelta degrees of freedom for variance/stdev: 1 (default, sample, n-1) or 0 (population, n). The *_population fields are always population. Accepted: integer 0-1.
methodNoPercentile interpolation (NumPy/R names): linear (default), nearest, lower, higher, midpoint. Accepted: linear, nearest, lower, higher, midpoint.
valuesYesComma-separated finite numbers, at most 500 values. Accepted: comma-separated finite numbers.
percentilesNoComma-separated percentiles 0-100, at most 20. Default 25,50,75. Accepted: numbers between 0 and 100.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / ddof / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / ddof / type
      Removed value: -"string"
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the read-only/idempotent/closed-world profile, and the description adds genuinely new behavioral facts: a $0.05 per-successful-call charge settled over x402 in USDC on Base, plus the fact that results are reproducible by naming an interpolation method. It does not discuss failure handling for invalid or oversized input, but the cost model and determinism guarantee are the two things an agent most needs before calling.

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 output inventory is front-loaded and the pricing caveat is placed at the end where it belongs. The first sentence is a long comma-chain of statistics that could be tightened, but every clause carries information and nothing is padding.

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 no output schema, the description carries the return-value burden itself and does so by naming every emitted field group, including the always-population variants alongside the ddof-dependent ones. Combined with the cost model, default settings and determinism note, an agent knows both what it gets back and what it will be charged.

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 all four parameters are already documented, including the ddof 0-1 range and the interpolation enum. The description largely restates that (ddof default 1 = sample, 0 = population; the *_population fields are always population), though it does frame ddof as a choice with consequences rather than a bare constraint. Baseline 3 is the right level given the schema does the heavy lifting.

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 resource (a numeric array) and enumerates exactly what is returned: count, sum, mean, median, mode, variance/stdev, min/max/range, quartiles/IQR, skewness, kurtosis and percentiles. No sibling in the list competes with this function, and an agent can tell instantly this is the statistical-aggregate tool rather than a converter or lookup.

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 phrase 'in one call' implicitly directs the agent here instead of computing statistics step-by-step, and the ddof/method notes give concrete usage context. There is no explicit when-not guidance or named alternative, but the sibling set contains no overlapping tool, so the missing exclusion costs little.

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.