Skip to main content
Glama

Stat Sphericity Test

stat_sphericity_test

Test sphericity with Mauchly's test before repeated-measures ANOVA with three or more conditions, so you can apply Greenhouse-Geisser correction when the assumption is violated.

Instructions

Mauchly's test of sphericity for a repeated-measures factor with 3+ levels.

When to use: before a repeated-measures ANOVA with three or more conditions. When it fails: report the Greenhouse-Geisser corrected p-value and the epsilon. The uncorrected F is anti-conservative when sphericity is violated.

Not applicable with only two levels — a paired t-test needs no sphericity assumption.

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>",
      "within": "<within>",
      "subject": "<subject>"
    },
    "name": "stat_sphericity_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
dvYes
nameYes
methodNomauchly
withinYes
subjectYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries full behavioral burden. It does add real value by explaining the consequence of violation ('the uncorrected F is anti-conservative') and what to do on failure, but it says nothing about what the test returns, whether the `method` parameter changes behavior, or how missing/repeated subject data is handled. An output schema exists, which offsets the return-value gap.

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 test identity, then cleanly segmented into when-to-use, when-it-fails, and not-applicable. Every sentence carries decision-relevant content; there is no filler or restatement of the name.

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?

For a statistical test whose return values are covered by the output schema, the description supplies the interpretive and applicability context an agent actually needs. The remaining gap is parameter meaning, which for a five-parameter tool with zero schema documentation leaves the agent guessing at argument semantics.

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 five parameters, and the description never names a single one (dv, within, subject, name, method). The terms 'repeated-measures factor' and 'conditions' loosely hint at `within`, but an agent gets no explicit mapping of parameters to meaning, and `method`/`name` are entirely unaddressed.

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 a specific test (Mauchly's) bound to a specific assumption (sphericity) and a specific design (repeated-measures factor with 3+ levels). This is unambiguous against generic siblings like stat_anova or stat_normality_test, though it does not explicitly contrast with the assumption-testing siblings by name.

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 explicit when-to-use ('before a repeated-measures ANOVA with three or more conditions'), an exclusion ('not applicable with only two levels — a paired t-test needs no sphericity assumption'), and a decision rule on failure (report Greenhouse-Geisser corrected p and epsilon). This is about as complete as usage guidance gets.

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