Skip to main content
Glama

Stat Multicomp Correction

stat_multicomp_correction

Correct p-values for multiple comparisons with Holm, FDR-BH, or Bonferroni correction to control false positives when several statistical tests are reported together.

Instructions

Correct a list of p-values for multiple comparisons.

WHEN TO USE: when you have a set of p-values computed outside Pingouin, or when applying a correction across several tests reported together.

Choosing a method:

  • holm — controls family-wise error rate; more powerful than Bonferroni. Default.

  • fdr_bh — controls false discovery rate; for many comparisons or exploratory work.

  • bonf — most conservative; only when any false positive is unacceptable.

  • none — no correction; only for a single pre-registered comparison.

State the method by name in the write-up; "we corrected for multiple comparisons" without naming the method is not reproducible.

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": {
      "pvals": "<pvals>"
    },
    "name": "stat_multicomp_correction"
  }
}

Input Schema

NameRequiredDescriptionDefault
alphaNo
pvalsYes
methodNoholm

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavioral differences: holm controls FWER and is more powerful than Bonferroni, fdr_bh controls FDR, bonf is most conservative. It does not explain what alpha does to the returned output (e.g., adjusted vs. reject decisions), leaving one behavioral aspect to the output schema.

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?

Front-loaded with purpose, then WHEN TO USE, then a scannable per-method breakdown. The closing remark about naming the method in the write-up is mildly tangential to invocation, though it reinforces method choice as a deliberate decision.

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 described, and the three-parameter surface is simple. Coverage of method semantics is strong; the only real gap is that alpha's role and effect are never addressed.

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 0% and the method parameter is an unconstrained string with only a default, so the description's enumeration of valid values (holm, fdr_bh, bonf, none) is essential and well beyond the schema. The pvals parameter is clarified by the purpose statement, but alpha is never mentioned despite being an input.

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?

"Correct a list of p-values for multiple comparisons" names a specific operation and its input resource, and no sibling tool in the catalog performs correction, so it is unambiguous at selection time.

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?

It states exactly when to reach for this tool (p-values computed outside the library, or corrections spanning several tests reported together), which implicitly excludes post-hoc cases handled by siblings like stat_pairwise_tests. The method-selection block gives explicit decision criteria for each of the four options.

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