Skip to main content
Glama

Stat Decision Assistant

stat_decision_assistant

Recommends the appropriate statistical test for a study design before analysis, using variable type, group count, and repeated measures to avoid invalid p-values.

Instructions

Recommend which statistical test fits a study design — call this BEFORE running a test.

This exists because choosing the wrong test is the most consequential error in statistical analysis, and it invalidates the p-value rather than merely producing a suboptimal number. If you are not certain which test applies, call this first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "stat_decision_assistant"
  }
}

Input Schema

NameRequiredDescriptionDefault
n_dvNoHow many dependent variables are compared jointly.
dv_typeNocontinuous | ordinal | categorical | count.continuous
n_groupsNoNumber of groups/conditions compared (1, 2, or 3+).
repeatedNoTrue if the same participants appear in every condition (within-subjects).
n_subjectsNoTotal number of participants, if known.
predictingNoTrue if the goal is prediction from continuous predictors rather than group comparison.
normality_okNoResult of the normality check, if already run.
has_covariateNoTrue if a continuous covariate must be controlled.
sphericity_okNoResult of Mauchly's test, if already run.
homogeneity_okNoResult of Levene's test, if already run.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description still discloses meaningful behavior: the tool is advisory and must precede test execution, and the stated consequence of skipping it is an invalidated p-value rather than a merely suboptimal result. However, it says nothing about determinism, side effects, or what the recommendation response contains, and no output-schema reference ties the advice to a concrete return shape.

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 actionable instruction is front-loaded in the first sentence, followed by a short rationale. The second paragraph is persuasive rather than descriptive and could be trimmed, but it does earn its place by motivating the agent to call this before a test.

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 all 10 parameters are optional with full schema coverage. Combined with clear call-ordering guidance, the definition is nearly sufficient; only the expected shape of the recommendation workflow is left implicit.

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% and every one of the 10 parameters is documented with defaults and meaning, so the schema carries parameter semantics. The description adds no guidance on which inputs are essential versus optional, so 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 — 'Recommend which statistical test fits a study design' — which immediately separates it from siblings like stat_anova or stat_chi2_independence that actually execute tests. An agent can tell what it gets back (a recommendation) 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 Guidelines4/5

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

Gives explicit ordering guidance ('call this BEFORE running a test') and a selection condition ('If you are not certain which test applies, call this first'), which routes the agent away from running a test prematurely. It stops short of naming concrete sibling alternatives or stating when to skip it (e.g., when the test is already known).

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