Skip to main content
Glama

two_proportion_z_test

Read-onlyIdempotent

Test whether two independent proportions differ significantly. Provides z-statistic, two-tailed p-value, confidence interval, and citation for comparing conversion rates in A/B tests.

Instructions

Test whether two independent proportions differ -- the standard test behind comparing conversion rates between two groups (e.g. an A/B test). Returns the z-statistic, two-tailed p-value, a confidence interval for the difference in proportions, a citation, and warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n1Yestotal observations in group 1
n2Yestotal observations in group 2
alphaNosignificance level for the test (and any confidence interval); default 0.05
successes1Yessuccesses observed in group 1
successes2Yessuccesses observed in group 2

Schema Changelog

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

  1. Changed5 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 / n1 / description
      Added value: +"total observations in group 1"
    • addedInput schema / properties / n2 / description
      Added value: +"total observations in group 2"
    • addedInput schema / properties / successes1 / description
      Added value: +"successes observed in group 1"
    • addedInput schema / properties / successes2 / description
      Added value: +"successes observed in group 2"
  2. First observedv0.1.0

TDQS

A4.2/5.0
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, so the safety profile is established. The description adds valuable behavioral context by listing return values (z-statistic, p-value, CI, citation, warnings) and the 'two-tailed' nature of the test, which is not available from structured fields. No contradictions with annotations exist.

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 compact, front-loaded, single paragraph with no filler. Each sentence earns its place: what the test does, its primary use case, and what it returns. It is neither over-specified nor under-specified.

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 moderately simple statistical test, the description is largely complete: it explains purpose, use case, and output list. Since there is no output schema, listing the returns is especially helpful. It could improve by stating assumptions or constraints (e.g., independence, sufficient sample size), but the current content is sufficient for correct selection and invocation.

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%, so the baseline is 3 even without additional parameter details. The description adds global context about comparing proportions, but it does not enrich individual parameter semantics beyond what the schema already provides for successes, totals, and alpha.

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 uses a specific verb-object structure: 'Test whether two independent proportions differ', immediately clarifying the statistical test and its typical use case ('comparing conversion rates between two groups'). It also lists exact outputs (z-statistic, two-tailed p-value, confidence interval, citation, warnings), making it easily distinguishable from sibling tests like one_proportion_z_test or chi_square_independence.

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?

The description clearly states the intended use case: comparing independent proportions, with the A/B testing example as a concrete scenario. It does not explicitly name alternative tests or state when not to use this tool, so it stops short of full exclusion guidance, but the context provided is clear enough for appropriate selection.

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