Skip to main content
Glama

Two-Sample t-Test

stats_t_test
Read-onlyIdempotent

Compare two groups of numeric data using Student's or Welch's t-test, and include Cohen's d effect size.

Instructions

Run a two-sample Student or Welch t-test with Cohen's d effect size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_aYesFirst group of numeric observations (at least 2 values).
group_bYesSecond group of numeric observations (at least 2 values).
equal_varNoIf True use Student's t-test (pooled variance, df = n1+n2-2); if False use Welch's t-test (unequal variances, fractional df).
alternativeNoAlternative hypothesis: 'two-sided', 'less', or 'greater'.two-sided

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dfYesDegrees of freedom (Welch: fractional; Student: n1+n2-2).
methodYesStudent (equal variances) or Welch (unequal variances).
p_valueYesp-value for the requested alternative hypothesis.
cohens_dYesEffect size: Cohen's d = (mean_a - mean_b) / pooled_sd (positive when group_a mean is larger).
statisticYesThe t statistic.
alternativeYesAlternative hypothesis tested.
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds value by disclosing that Cohen's d effect size is computed, which is a behavioral detail beyond annotations. No contradiction exists between the description and annotations.

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 a single, front-loaded sentence that efficiently states the core action and a key output (effect size). No redundant or filler content is present.

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?

Given the comprehensive input schema and the presence of an output schema, the brief description is sufficient for selection and invocation. It conveys the essential purpose (two-sample t-test, Student/Welch, Cohen's d) without needing to repeat structured schema details. The only gap is usage guidance, already accounted for in that dimension.

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?

The schema provides detailed descriptions for all four parameters (group_a, group_b, equal_var, alternative), achieving 100% coverage. The description adds no parameter-level detail, so the baseline of 3 applies as the schema carries the heavy lifting.

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 specifies the tool's function: 'Run a two-sample Student or Welch t-test with Cohen's d effect size.' It identifies a specific statistical test and distinguishes it from siblings like Mann-Whitney (non-parametric) and chi-square (categorical) by naming the parametric test and effect size.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

No explicit guidance is provided on when to use this tool versus alternatives. The phrase 'Student or Welch t-test' implies parametric assumptions for comparing two means, but the description does not state when to prefer it over the sibling Mann-Whitney test or mention assumptions like normality or equal variances except through the equal_var parameter in the schema.

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

Install Server

Other Tools

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/madhusudan-kulkarni/biotools-mcp'

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