Skip to main content
Glama

BRAINIAC A/B Testing & Experimentation Statistics

Compute multi-armed bandit traffic weights

experimentation_bandit-allocate
Read-onlyIdempotent

Next-period traffic weights from arm outcomes: Thompson-sampling probabilities by deterministic quadrature, or UCB1 indices, with an exploration floor. Price $0.03 USDC. POST /api/v1/experimentation/bandit-allocate. 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": {
      "policy": "<policy>",
      "arms": "<arms>"
    },
    "name": "experimentation_bandit-allocate"
  }
}

Input Schema

NameRequiredDescriptionDefault
armsYesarms, array. Required.
priorNoprior, object. Required.
policyYespolicy, string, one of thompson, ucb1. Required.
minShareNominShare, number, from 0 to 0.5. Required.

Output Schema

NameRequiredDescriptionDefault
policyNopolicy. String.
sourcesNosources. Array.
weightsNoweights. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing cost ($0.03 USDC), the POST endpoint, and the critical x402 behavior that an unpaid call returns payment terms without running. It also indicates the computation method (deterministic quadrature) and an exploration floor, which annotations cannot convey.

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?

Front-loaded with the purpose, then algorithm, cost, endpoint, and payment caveat in a compact three-sentence block. Every sentence carries information, though the endpoint path and price could be considered structured metadata rather than guidance.

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?

With an output schema present, return values need not be described, and the description covers cost, transport, and payment gating. For a 4-parameter tool with nested arms, it is nearly complete; only the effect of minShare and prior on results is left implicit.

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 schema already documents the fields. The description adds marginal meaning by calling out the 'exploration floor' (relating to minShare) and the sampling approach behind prior, but it does not explain how minShare or the Beta prior parameters affect the returned weights.

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?

States a specific action and output — next-period traffic weights computed from arm outcomes — and names both algorithms (Thompson sampling via quadrature, UCB1). It does not explicitly contrast itself with siblings like experimentation_bayesian-ab or experimentation_ab-test-frequentist, which is the only thing keeping it from 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 Guidelines3/5

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

Use is implied by 'Next-period traffic weights from arm outcomes' — an agent can infer this is for sequential traffic allocation rather than test analysis. There is no explicit when-to-use, when-not-to-use, or named alternative, so guidance is inferred rather than stated.

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