Skip to main content
Glama

Stat Nonparametric K

stat_nonparametric_k

Run Kruskal-Wallis or Friedman tests to compare three or more groups when normality is violated. Use it for ordinal or non-normal continuous outcomes instead of ANOVA.

Instructions

Kruskal-Wallis (independent) or Friedman (repeated) — three or more groups, no normality assumption.

WHEN TO USE: 3+ groups with ordinal outcomes, or continuous outcomes where normality is badly violated. WHEN NOT TO USE: when the parametric assumptions hold — the rank test is less powerful.

Follow a significant result with stat_pairwise_tests(parametric=False) and a correction.

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_nonparametric_k"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvYes
nameYes
withinNo
betweenNo
subjectNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the assumption profile and the power tradeoff versus parametric tests, which is real behavioral value. However, it never explains the tool's dispatch behavior — that it presumably selects Kruskal-Wallis vs Friedman based on whether a repeated-measures design is supplied — nor anything about what a significant-result report contains (though an output schema covers returns).

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?

Front-loaded with the technique identification, then two scannable WHEN TO USE / WHEN NOT TO USE blocks, then a follow-up action. Every line earns its place and there is no filler.

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

Completeness3/5

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

The output schema relieves the description of explaining return values, and the usage guidance is thorough. But for a 5-parameter statistical entry point with zero schema coverage and an undisclosed test-selection rule, the definition leaves an agent guessing about how to configure within/between/subject correctly.

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

Parameters2/5

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

Schema description coverage is 0% across 5 parameters, so the description must compensate and largely does not. The words 'independent' and 'repeated' hint at the between/within distinction, but 'name', 'dv', 'subject' are never mapped to meaning, and the critical rule for choosing the within vs between form is left unstated.

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?

Names the specific tests (Kruskal-Wallis for independent, Friedman for repeated) and constrains scope to 'three or more groups', which implicitly separates it from the two-group sibling. An agent can identify the test family and the design shape 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?

Explicit WHEN TO USE (3+ groups, ordinal or badly non-normal continuous) and WHEN NOT TO USE (parametric assumptions hold, rank test less powerful) sections. It also routes the agent onward to stat_pairwise_tests(parametric=False) with a correction after a significant result, naming both the alternative and the follow-up step.

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