Skip to main content
Glama

Stat Normality Test

stat_normality_test

Test whether a variable is normally distributed, optionally per group, to check the normality assumption before running parametric tests like t-tests, ANOVA, or Pearson correlation.

Instructions

Test whether a variable is normally distributed, optionally within each group.

When to use: before any parametric test (t-test, ANOVA, Pearson correlation). When NOT to use: as a gatekeeper that alone decides parametric vs non-parametric. With large n the test detects trivial deviations; with small n it has low power. Judge with the QQ plot and skewness too.

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": {
      "name": "<name>",
      "dv": "<dv>"
    },
    "name": "stat_normality_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvYesThe variable to test.
nameYesSession dataset name.
groupNoOptional grouping column — normality is then tested per group.
methodNoshapiro (default, best for n < 50) | normaltest | jarque_bera | omni.shapiro

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose genuine behavioral nuance: large n flags trivial deviations and small n yields low power, so results must be read alongside QQ plots and skewness. It stops short of stating assumptions about missing data, data loading prerequisites, or error behavior, which is why it is not a 5.

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?

Purpose is front-loaded in the first sentence, then the when-to-use/when-not structure is labeled and scannable. Every sentence adds distinct decision value; nothing repeats the schema verbatim.

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?

An output schema exists, so return values need not be explained, and the description covers purpose, timing, and interpretation caveats for a low-risk read-only test. It leaves minor gaps around prerequisites (e.g., that the session dataset must be loaded) and handling of missing values.

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 dv, name, group, and method. The description adds only a reinforcement that group causes per-group testing, which matches the schema rather than extending it; baseline 3 applies.

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 and resource ('test whether a variable is normally distributed') plus the optional per-group scope. This cleanly separates it from siblings like stat_homogeneity_test (variance) or stat_sphericity_test, so an agent can route 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 Guidelines5/5

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

Gives an explicit when-to-use trigger (before t-test, ANOVA, Pearson correlation) and an explicit when-NOT-to-use warning against treating it as a sole gatekeeper, including the n-dependence of the result. This is the strongest form of routing guidance.

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