Skip to main content
Glama

pairwise_group_comparisons

Read-onlyIdempotent

Run pairwise statistical comparisons across multiple groups with automatic multiple-comparison correction. Choose t-test or Mann-Whitney, get p-values, effect sizes, and correction details in one call.

Instructions

Run every pairwise comparison across 2+ groups and correct for multiple comparisons in one call, instead of orchestrating k*(k-1)/2 separate two_sample_t_test/mann_whitney_u calls plus a separate correction call by hand -- and forgetting the correction is one of the most common real mistakes this package exists to prevent. The natural follow-up after a significant one_way_anova/kruskal_wallis result: pass the same groups here to find which group(s) differ, not just whether any do. Returns every pair's statistic, raw p-value, whether it's still significant after correction, and an effect size, plus the correction method's citation and warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNo"t_test" (two_sample_t_test per pair, reports cohens_d) or "mann_whitney" (mann_whitney_u per pair, reports rank_biserial_correlation) -- match whichever you used for the overall group comparison (one_way_anova vs. kruskal_wallis)t_test
alphaNosignificance level for the test (and any confidence interval); default 0.05
groupsYesone list of observations per group; at least 2 groups
labelsNooptional name per group, same length and order as groups; carried through to each comparison for readability
equal_varNoonly used when test="t_test": assume equal population variances (pooled) instead of Welch's test, same meaning as two_sample_t_test's equal_var
correctionNo"bh" (Benjamini-Hochberg, less conservative, default), "bonferroni" (more conservative), or "none" (raw p-values, e.g. if correcting elsewhere)bh

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context: automatic multiple-comparison correction, return contents (statistic, raw p, significance after correction, effect size), and inclusion of citation/warnings. It also warns about the common mistake of forgetting correction, which enriches the agent's understanding.

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?

The description is structured with three purposeful sentences: what it does, when to use it, and what it returns. Despite the first sentence being long, every phrase earns its place—it explains the benefit, the avoided complexity, and the mistake it prevents. No filler or repetition of schema fields.

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

Completeness5/5

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

For a tool with 6 parameters and no output schema, the description covers return values explicitly, including citation and warnings. It also provides usage context and differentiates from siblings. The absence of an output schema raises the burden, and the description meets it fully by enumerating the output fields. No critical operational details seem missing.

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%, with each of the 6 parameters already documented. The description itself does not elaborate on individual parameters beyond what the schema provides, so baseline 3 applies. It does not add new parameter-specific meaning, but the schema already covers semantics effectively.

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?

The description clearly states the tool's purpose: 'Run every pairwise comparison across 2+ groups and correct for multiple comparisons in one call.' It explicitly contrasts with orchestrating k*(k-1)/2 separate two_sample_t_test/mann_whitney_u calls, distinguishing it from sibling tools. The verb 'Run' and resource 'pairwise comparisons' are specific and unambiguous.

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?

The description provides explicit when-to-use guidance: 'The natural follow-up after a significant one_way_anova/kruskal_wallis result' and contrasts with manual orchestration of separate tests plus correction. It also tells the agent to match the test type to the overall comparison, effectively excluding alternatives like stand-alone t-tests or corrections.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrnh/rigor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server