Skip to main content
Glama

A/B Test Analysis

ab_test_analyze
Read-onlyIdempotent

Compare two campaigns as A/B test variants to determine statistical significance. Runs a two-proportion z-test or means comparison on a chosen primary metric (ctr, conversion rate, roas, cpc, cpa), computes p-value and 95% confidence interval, identifies the winner with lift and confidence level, and provides a recommendation based on lift ≥5% and p<0.05.

Instructions

Compare two campaigns as A/B test variants and determine statistical significance. Input: campaign_id_a, campaign_id_b, primary_metric ("ctr"|"conversion_rate"|"roas"|"cpc"|"cpa"). Runs a two-proportion z-test (or means comparison for continuous metrics), computes p-value and 95% confidence interval, identifies the winner, and returns {winner, confidence_level, p_value, lift_percent, sample_size_a, sample_size_b, significant (bool), recommendation}. Use with lift ≥5% and p<0.05 as a decision rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_id_aYesVariant A campaign
campaign_id_bYesVariant B campaign
primary_metricNoctr
Behavior4/5

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

The description explains the statistical methods (two-proportion z-test or means comparison), outputs (p-value, confidence interval, winner, etc.), and decision rule. Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true, so the description adds meaningful behavioral context beyond annotations.

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?

The description is concise and front-loaded with the main purpose, followed by input format, method, and output. One sentence could be split for readability, but overall efficient.

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?

Given the tool's moderate complexity, 3 parameters, annotations, and no output schema, the description nearly fully explains inputs, process, and outputs. It lacks only an explicit list of return fields beyond the example, but the example is thorough.

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?

The input schema describes campaign IDs as uuid with patterns, and primary_metric has enum with defaults. The description adds meaning by explaining that primary_metric is used for the statistical test type and lists the specific metrics. Schema coverage is 67%, so description compensates well.

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 compares two campaigns as A/B test variants and determines statistical significance. The verb 'compare' and resource 'campaigns as A/B test variants' are specific, and the tool is distinct from siblings like 'ads_report' or 'anomaly_detect' which focus on different analyses.

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 explicitly says to use the tool for comparing two campaigns as A/B test variants, and provides a decision rule (lift ≥5% and p<0.05). However, it does not explicitly mention when not to use this tool or name alternative tools for related tasks.

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

Install Server

Other Tools

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/enzoemir1/adops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server