Skip to main content
Glama

Ad Spec Guard

ab_test_significance

Read-only

Run a two-proportion z-test on two variants of an ad, landing page or audience, and report the p-value, whether the difference is statistically significant at the chosen confidence level, and how much more traffic would be needed to resolve it if it is not. Use it for any comparison of two rates instead of judging the gap by eye.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "variant_a_trials": "<variant_a_trials>",
      "variant_a_successes": "<variant_a_successes>",
      "variant_b_trials": "<variant_b_trials>",
      "variant_b_successes": "<variant_b_successes>"
    },
    "name": "ab_test_significance"
  }
}

Input Schema

NameRequiredDescriptionDefault
confidenceNoConfidence level for the test.
variant_a_trialsYesDenominator for variant A: impressions for a click rate, clicks for a conversion rate.
variant_b_trialsYesDenominator for variant B.
variant_a_successesYesNumerator for variant A.
variant_b_successesYesNumerator for variant B.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral value beyond that: it discloses the three output elements (p-value, significance verdict at the chosen confidence, and required additional traffic when not significant). It does not mention the z-test's assumptions (independence, minimum expected cell counts), which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Two sentences, front-loaded with the verb and method, with the usage rule second. Slightly dense in the first sentence but every clause (method, inputs, three outputs) contributes information an agent needs.

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?

There is no output schema, so the description must describe return values, and it does so explicitly (p-value, significance at the chosen confidence, required traffic). For a stateless five-parameter computation with full schema coverage and read-only annotations, the only thing an agent might still want is the test's assumptions or the minimum sample expectation.

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%, including numerator/denominator explanations and the confidence enum, so the schema carries the parameter burden. The description reinforces the two-rate framing but adds no syntax, units or constraints beyond what the schema already states; baseline 3 applies.

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 statistical operation (two-proportion z-test) on a specific resource (two variants of an ad, landing page or audience) and enumerates what it returns. This is unmistakable against siblings like validate_ad_copy or estimate_budget_feasibility, which validate or estimate rather than test a result.

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?

'Use it for any comparison of two rates instead of judging the gap by eye' gives a clear positive trigger and implicitly excludes non-rate comparisons (single-variant metrics, absolute counts). It does not name a sibling alternative or spell out when-not cases such as tiny sample sizes, but the surrounding tool set is far enough away that no routing ambiguity is created.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.