Skip to main content
Glama

Last Price

set_experiment_bandit

DestructiveIdempotent

Switch bandit allocation on or off for one of your stored experiments, and set its floors: pass experiment_key and bandit_enabled, and optionally min_weight_pct (1 to 50, the least traffic any arm keeps) and control_min_weight_pct (1 to 90, the least control keeps). The floors have to fit the number of arms. Read the result with get_experiment_stopping. Answers "not enabled" until sequential testing is switched on for your workspace. Needs a claimed Last Price credential for the workspace that owns the experiment. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
bandit_enabledYesWhether bandit allocation is on.
experiment_keyYesThe experiment key, as created (lowercase letters, digits and underscores).
min_weight_pctNoThe least traffic any arm keeps, in percent.
control_min_weight_pctNoThe least traffic control keeps, in percent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=true, and the description adds meaningful context beyond them: the sequential-testing prerequisite, the credential claim requirement, and the 403 refusal for sandbox keys. It stops short of saying what state is lost when bandit allocation is turned off (e.g., learned arm weights), which is the main destructive detail an agent would want.

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 purpose and required parameters come first, followed by the optional floors and then preconditions, which is the right order. The two sentences are dense but every clause carries information; only the trailing credential/workspace caveats feel stacked.

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 no output schema, the description correctly points to get_experiment_stopping for reading the result and covers auth and workspace preconditions. The only gap is the effect of disabling the bandit on existing allocation state, which matters for a tool flagged destructive.

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% and the description largely restates the schema's own definitions of min_weight_pct and control_min_weight_pct. It does add one cross-parameter constraint not expressible in the schema, that the floors must fit the number of arms, so it edges above the baseline but not far.

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 opens with a specific verb and resource: switching bandit allocation on or off for a stored experiment and setting its traffic floors. It names the exact required keys, so an agent can distinguish this from siblings like allocate_variant_traffic or set_price_exploration without opening the schema.

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?

It explicitly routes the agent to get_experiment_stopping to read the result and warns that the call answers "not enabled" until sequential testing is switched on, which is real when-to-use context. It does not contrast against sibling tools for traffic allocation, but the prerequisites and follow-up path are clear.

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