Skip to main content
Glama

BRAINIAC Statistics & Quality Engineering

Calculate statistical power or sample size

statistics_power-sample-size
Read-onlyIdempotent

Power or required sample size for a two-sample t-test (noncentral t), one-way ANOVA (noncentral F), two proportions (Cohen's h) and a correlation (Fisher z). Exactly one of n or power is solved. Price $0.02 USDC. POST /api/v1/statistics/power-sample-size. An unpaid call returns the x402 payment terms and does not run.

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": {
      "test": "<test>"
    },
    "name": "statistics_power-sample-size"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNon, value. Optional.
rNor, value. Optional.
p1Nop1, value. Optional.
p2Nop2, value. Optional.
testYestest, string, one of t_two_sample, anova_oneway, two_proportions, correlation. Required.
alphaNoalpha, number. Required.
powerNopower, value. Optional.
groupsNogroups, integer, from 2 to 100. Optional.
effectSizeNoeffectSize, value. Optional.

Output Schema

NameRequiredDescriptionDefault
nRawNonRaw. Number.
powerNopower. Number.
methodNomethod. String.
totalNNototalN. Number.
sourcesNosources. Array.
nPerGroupNonPerGroup. Number.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds behavior annotations cannot express: a $0.02 USDC price, the POST endpoint, and that an unpaid call returns x402 payment terms without executing — a critical failure mode. It does not describe output fields, but an output schema exists.

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?

Four compact sentences, front-loaded with the capability, then the solving rule, then cost, endpoint and payment failure mode. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Nine parameters but only one required, an output schema in place, and annotations covering safety — the description fills the remaining gaps: what is computed, which of n/power to supply, and how payment affects execution. Effect-size parameter mapping is the only notable omission.

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%, so baseline is 3; the description earns above that by clarifying the mutual exclusivity of n and power (both are nullable/optional in the schema) and by tying each test value to its effect-size convention. It still leaves effectSize, groups, p1/p2 and r unmapped to specific tests, which the agent must infer.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names the exact quantity computed (power or required sample size) and enumerates the four supported designs with their underlying distributions (noncentral t, noncentral F, Cohen's h, Fisher z). That is far more specific than the title, though it never contrasts itself with the sibling statistics_t-test or statistics_anova that supply the raw test results.

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

Usage Guidelines3/5

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

The line "Exactly one of n or power is solved" tells the agent how to drive the call, which is real operational guidance. It gives no when-to-use/when-not context relative to siblings, e.g. that this is prospective planning rather than running an actual test, so usage must be inferred.

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