Skip to main content
Glama

BRAINIAC A/B Testing & Experimentation Statistics

Detect A/B sample ratio mismatch

experimentation_sample-ratio-mismatch
Read-onlyIdempotent

Chi-square goodness-of-fit test of observed arm counts against expected traffic shares, with an exact binomial p-value for tiny two-arm counts and generic causes when a mismatch is flagged. Price $0.01 USDC. POST /api/v1/experimentation/sample-ratio-mismatch. An unpaid call returns the x402 payment terms and does not run.

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": {
      "arms": "<arms>"
    },
    "name": "experimentation_sample-ratio-mismatch"
  }
}

Input Schema

NameRequiredDescriptionDefault
armsYesarms, array. Required.
thresholdNothreshold, number. Required.

Output Schema

NameRequiredDescriptionDefault
dfNodf. Number.
srmNosrm. Boolean.
armsNoarms. Array.
hintsNohints. Array.
pValueNopValue. Number.
sourcesNosources. Array.
chiSquareNochiSquare. Number.
thresholdNothreshold. Number.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish that the tool is a read-only, idempotent, non-destructive operation (readOnlyHint, idempotentHint, destructiveHint). The description adds behavior the annotations cannot express: it costs $0.01 USDC, it POSTs to a specific endpoint, and an unpaid call returns x402 payment terms without executing. Calling this operation read-only despite using a POST is consistent with the annotations, not contradictory, and the description also says a flagged mismatch returns generic causes.

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?

Three sentences: the statistic is front-loaded, followed by cost/transport and the unpaid-call behavior. There is little filler, though the opening sentence is dense and could be split for readability. No sentence is redundant.

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?

An output schema exists, so the return payload does not need to be described, and the description covers the missing pieces that matter: price, endpoint, and the failure mode for unpaid calls. The only remaining gap is the absence of guidance on when a result should change an agent's decisions, which is minor for a single-purpose statistical test.

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 coverage is 100%, so the schema already documents both parameters (arms with name/observed/expectedShare, and threshold with a default of 0.0005). The description doesn't add further meaning about what expectedShare means, or about how the threshold interacts with p-values. This is the baseline 3 when the schema does the documentation work.

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 names a concrete verb and resource: a chi-square goodness-of-fit test comparing observed arm counts against expected traffic shares, including the exact fallback for small two-arm samples. That is enough to recognize it as a sample-ratio-mismatch test, even without naming a sibling. It stops short of explicitly saying 'use this to detect SRM', so a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to run this instead of the other experimentation tools (for example, before you trust a frequentist or Bayesian readout). The only conditional presented concerns payment, not tool selection. Usage must be inferred from the statistic being computed.

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.

Resources