Skip to main content
Glama

power_for_two_proportion_test

Read-onlyIdempotent

Compute statistical power to detect a true difference between two proportions (e.g., conversion rates) with a two-proportion z-test, given sample size per group and proportion estimates.

Instructions

Statistical power to detect a difference between two proportions (e.g. two conversion rates) with n_per_group observations in each group, using a two-proportion z-test. p1 and p2 are interchangeable (only their difference matters) -- e.g. current vs. new conversion rate. Use sample_size_for_two_proportion_test instead to solve for n given a target power. Returns a float in [alpha, 1].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
p1Yesa proportion in [0, 1]
p2Yesa proportion in [0, 1]
alphaNosignificance level for the test (and any confidence interval); default 0.05
n_per_groupYesplanned (or actual) observations per group

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. Changed4 schema fields changedv0.3.0
    • addedInput schema / properties / alpha / description
      Added value: +"significance level for the test (and any confidence interval); default 0.05"
    • addedInput schema / properties / n_per_group / description
      Added value: +"planned (or actual) observations per group"
    • addedInput schema / properties / p1 / description
      Added value: +"a proportion in [0, 1]"
    • addedInput schema / properties / p2 / description
      Added value: +"a proportion in [0, 1]"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds meaningful context beyond annotations: p1 and p2 are interchangeable (only difference matters), returns a float in [alpha, 1], and uses a two-proportion z-test. No contradiction with the readOnly/idempotent/non-destructive hints.

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 sentences, front-loaded with purpose, and every sentence carries useful information (purpose, parameter semantics, alternative, return range). No fluff or irrelevant detail.

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?

The description adequately covers purpose, usage guidance, parameter nuance, and return range. It does not mention statistical assumptions (e.g., normal approximation) or clarify the output schema further, but the presence of an output schema and strong annotations makes this acceptable.

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 already provides 100% parameter descriptions, so the baseline is 3. The description adds the insight that p1 and p2 are interchangeable and clarifies that n_per_group is per group, but does not fundamentally extend the schema's meaning.

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 computes statistical power for a two-proportion z-test, specifying the resource (two proportions) and the test type. It also distinguishes itself from the sibling sample-size tool by naming sample_size_for_two_proportion_test.

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?

Explicitly tells when to use this tool (detect difference between two proportions) and provides a clear alternative: 'Use sample_size_for_two_proportion_test instead to solve for n given a target power.' Also notes p1/p2 interchangeability, reducing misuse.

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