Skip to main content
Glama

Confidence Interval

confidence_interval
Read-onlyIdempotent

Compute a confidence interval for a mean (normal approximation). FREE.

Typical input {"mean": 72.4, "std_dev": 8.1, "n": 64, "confidence_pct": 95} returns {"mean": 72.4, "margin_of_error": 1.9845, "interval": [70.4155, 74.3845], "note": "..."}.

Use on data already collected, for a mean. Normal approximation, so it is unreliable on very small or heavily skewed samples. Not for proportions or two-group comparisons - the data server's ab_test compares two proportions. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "confidence 90/95/99, n>=2, std_dev>=0"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
nYesSample size; at least 2.
meanYesSample mean.
std_devYesSample standard deviation; 0 or greater.
confidence_pctNoConfidence level; must be 90, 95, or 99. Default 95.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, which already declare read-only and idempotent behavior, the description discloses important behavioral traits: normal approximation is unreliable on very small or heavily skewed samples, and invalid input returns a structured error object rather than a protocol error. It also notes retry safety after correcting input, adding practical context.

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 core purpose and is generally efficient, with useful example input/output and caveats. However, it includes minor non-essential elements such as 'FREE.' and repeats read-only/idempotent facts already captured by annotations.

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?

Given the tool's complexity, an output schema exists, and the description covers usage scope, statistical limitations, exclusions, error behavior, and retry safety. An agent has enough information to call the tool correctly and understand when not to use it.

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 all four parameters and their constraints. The description provides an example input and repeats constraints, but does not add parameter semantics beyond what the schema already states; 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 gives a specific verb and resource: compute a confidence interval for a mean using normal approximation. It also scopes the tool precisely by excluding proportions and two-group comparisons, making it distinguishable from alternatives like ab_test.

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?

It explicitly states when to use the tool ('Use on data already collected, for a mean') and when not to use it ('Not for proportions or two-group comparisons'), naming ab_test as the alternative for two-group comparisons. This leaves little ambiguity for an agent choosing between tools.

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.