Skip to main content
Glama

Sample size or MDE

power_calc
Read-only

Estimate equal-allocation per-arm sample size or minimum detectable effect for two-sided proportion or mean tests; provide one target and key design inputs to plan experiment power.

Instructions

Estimate equal-allocation sample size or MDE for a two-sided test.

    Provide exactly one of mde or n_per_arm. The normal approximation does
    not include peeking, multiple metrics, or a finite-population correction.
    

Input Schema

NameRequiredDescriptionDefault
mdeNoAbsolute difference to detect. Omit when solving for MDE.
alphaNoTwo-sided type I error.
powerNoDesired power, 1 - beta.
sigmaNoOutcome standard deviation. Required for mean designs.
metricYes
baselineNoControl rate. Required for proportion designs.
n_per_armNoPer-arm sample size. Omit when solving for sample size.

Output Schema

NameRequiredDescriptionDefault
mdeNoAbsolute difference (treatment minus control) the design can detect.
alphaYes
powerYes
sigmaNo
metricYes
formulaYes
baselineNo
n_per_armNo
allocationNoequal
solved_forYes
alternativeNotwo-sided

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds substantive behavior beyond that: equal allocation only, two-sided test, and an explicit list of what the normal approximation ignores (peeking, multiple metrics, finite-population correction). It does not describe output shape, but an output schema exists to carry that.

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?

Three short sentences, nothing redundant. The core purpose is front-loaded and the constraint and caveat follow in priority order.

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 7-parameter statistical tool with an output schema, the description covers the solve-mode constraint and the modeling limitations that an agent must know to use results correctly. Return values need not be explained given the output schema, and the remaining parameter detail is carried by 86% schema coverage.

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 description coverage is 86%, so the per-parameter meanings are largely handled structurally and a baseline 3 applies. The description earns an extra point by stating a cross-parameter constraint the schema cannot express — exactly one of mde or n_per_arm must be supplied — which is the single most likely invocation error for this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Estimate equal-allocation sample size or MDE for a two-sided test.' That tells an agent both what is computed and the two solve modes, which no sibling tool covers. It does not name or differentiate against siblings, but the purpose itself is unambiguous.

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?

'Provide exactly one of mde or n_per_arm' is an explicit operational rule that selects the solve direction, and the caveat sentence tells the agent when the result is not valid (peeking, multiple metrics, finite-population correction). It stops short of naming an alternative approach for those excluded cases, so there is no full when-to-use-instead routing.

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