Skip to main content
Glama
theluckystrike

ab-test-sample-size-calculator-mcp

A/B test duration estimator

estimate_test_duration
Read-onlyIdempotent

Calculate how many days an A/B test must run from sample size per variant or baseline rate and MDE, daily visitors, and traffic share; returns exact days and recommended whole weeks.

Instructions

How many days an A/B test must run: from a known sample size per variant, or from baseline rate and MDE (computed as in calculate_sample_size), plus daily visitors and the share of traffic in the test. Returns exact days and the recommended whole weeks (to cover weekday effects).

Input Schema

NameRequiredDescriptionDefault
mdeNoMinimum detectable effect (relative by default).
alphaNoSignificance level, default 0.05.
powerNo
mde_typeNorelative
variantsNoNumber of arms including control.
baseline_rateNoControl conversion rate, for computing the sample size.
traffic_shareNoFraction of those visitors entered into the test, default 1.
daily_visitorsYesEligible visitors per day across the whole site or page.
sample_size_per_variantNoKnown users per arm. If omitted, give baseline_rate and mde.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add substance beyond that — and it does, disclosing that the tool returns both exact days and a recommended whole-week figure rounded up to absorb weekday effects. That return-shape context matters especially since there is no 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with a clear subject (days required), the two input modes, and the output guarantee — no filler and nothing buried. The parenthetical about calculate_sample_size is load-bearing rather than decorative.

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 read-only, closed-world estimator with 9 parameters and no output schema, the description gives enough to call it correctly and to know what comes back. Minor gaps remain: behavior when both sample_size_per_variant and baseline_rate/mde are provided, and whether mde_type interacts with the baseline path.

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 78%, so the schema already documents most parameters, but the description adds the grouping logic an agent needs: which parameters form the sample-size branch, which form the baseline-rate branch, and that traffic_share excludes the non-entered portion of daily visitors. It does not clarify precedence if both branches are supplied, leaving one ambiguity.

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 computation and its unit ('How many days an A/B test must run') plus the two ways to feed it, which is enough to distinguish it from calculate_sample_size (sample size) and test_ab_significance (result analysis). The parenthetical cross-reference to calculate_sample_size makes the boundary with that sibling explicit.

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?

Clearly describes the two entry paths — known 'sample size per variant' vs 'baseline rate and MDE' — and names the inputs required alongside them (daily visitors, traffic share). It stops short of stating when not to use it or which of the sibling tools handles the adjacent question, so it is clear context rather than full routing guidance.

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