Skip to main content
Glama

airstrings_variant_set

DestructiveIdempotent

Create or replace the entire A/B experiment draft for an existing text string key by supplying every variant and traffic allocation; the base string serves as control.

Instructions

Create or replace the A/B experiment for one text-format string key that already exists on the server in the active environment. Replaces the whole experiment as a new draft, so pass every variant each time; the key's base string is the implicit 'control' variant. Refused while the experiment is running (stop it first) and on a protected environment. Does not start it: call airstrings_variant_start, then airstrings_publish. Returns the stored experiment. To read the current one first, use airstrings_variant_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesServer-side string key (format text) the experiment belongs to, e.g. 'onboarding.welcome'.
variantsYesEach non-control variant name to an object of locale=value pairs, e.g. {"treatment": {"en": "Hi"}}. Never include 'control' — it is the base string. Give a value for every locale the base string has, or airstrings_variant_start will refuse.
allocationYesVariant name to integer traffic weight, including 'control', e.g. {"control": 50, "treatment": 50}. Weights are relative; give every variant in variants a weight.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.22.4
    • changedInput schema / properties / allocation / description
      Previous value: -"Object mapping variant name to integer weight, e.g. {\"control\": 50, \"treatment\": 50}."New value: +"Variant name to integer traffic weight, including 'control', e.g. {\"control\": 50, \"treatment\": 50}. Weights are relative; give every variant in variants a weight."
    • changedInput schema / properties / key / description
      Previous value: -"The string key the experiment belongs to (e.g., 'onboarding.welcome')."New value: +"Server-side string key (format text) the experiment belongs to, e.g. 'onboarding.welcome'."
    • changedInput schema / properties / variants / description
      Previous value: -"Object mapping each non-control variant name to an object of locale=value pairs, e.g. {\"treatment\": {\"en\": \"Hi\"}}. Never include 'control' — it is the base string."New value: +"Each non-control variant name to an object of locale=value pairs, e.g. {\"treatment\": {\"en\": \"Hi\"}}. Never include 'control' — it is the base string. Give a value for every locale the base string has, or airstrings_variant_start will refuse."
    • changedInput schema / required
      Previous value: -[
      -  "key"
      -]New value: +[
      +  "key",
      +  "allocation",
      +  "variants"
      +]
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the whole experiment is replaced (destructive scope), that it is written as a new draft, that every variant must be resupplied because the key's base string is the implicit control, and the two preconditions that cause refusal. The idempotent-by-replacement semantics are also explained, complementing idempotentHint=true rather than merely restating it.

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

Conciseness5/5

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

Three dense sentences front-load the operation and replace semantics, then preconditions, then the follow-up tool chain. No sentence is filler and nothing needed for correct invocation is repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, nested-object mutation tool with no output schema, the definition supplies preconditions, destruction scope, follow-up calls, and even notes that it returns the stored experiment. An agent has everything required to call it safely without additional discovery.

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?

Schema description coverage is 100%, so the baseline is 3 and the schema already documents key, variants (locale/value pairs, never 'control') and allocation weights. The description adds a genuine cross-parameter constraint — 'pass every variant each time' — that explains why the variants object must be complete on every call, which is not obvious from the schema alone.

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 verb pair and resource ('create or replace the A/B experiment') with tight scoping to a text-format string key in the active environment. It is clearly distinguishable from siblings like airstrings_strings_set and airstrings_variant_start without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use airstrings_variant_status to read first, airstrings_variant_start then airstrings_publish to activate, and airstrings_variant_stop before re-running. It also states two hard refusal conditions (experiment running, protected environment), which is exactly the when-not guidance the rubric rewards.

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