Skip to main content
Glama

Change an experiment variant

update_experiment_variant

Change a draft experiment's variant (key b, c or d): send the page's components as they should be in that variant, in the same shape as update_draft. Blocks you leave unchanged keep following the live page. Only experiments that haven't started can change. Returns savedAt and the blocks that now differ from the page.

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": {
      "id": "<id>",
      "variant": "<variant>",
      "components": "<components>"
    },
    "name": "update_experiment_variant"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe experiment's id, from create_experiment or list_experiments.
fieldsNoPage fields that differ in this variant. Leave out to keep the page's own.
variantYesWhich variant to change. a is the original page and cannot change here.
componentsYesThe page's blocks as they should be in this variant, in the blockShape from get_schema, keeping block ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / components / description
      Added value: +"The page's blocks as they should be in this variant, in the blockShape from get_schema, keeping block ids."
    • addedInput schema / properties / fields / description
      Added value: +"Page fields that differ in this variant. Leave out to keep the page's own."
    • addedInput schema / properties / id / description
      Added value: +"The experiment's id, from create_experiment or list_experiments."
    • addedInput schema / properties / variant / description
      Added value: +"Which variant to change. a is the original page and cannot change here."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (which only say not read-only, not destructive, not open-world), the description discloses the merge semantics for omitted blocks, the eligibility restriction to unstarted experiments, and the return payload (savedAt plus differing blocks). It does not cover permissions/authorization or what error occurs when the experiment has started, which keeps it short of a 5.

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?

Four compact sentences with the resource and variant constraint front-loaded, then the merge rule, then the eligibility gate, then the return value. No filler, and the reference to update_draft is placed where the shape question would arise.

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 nested-object mutation tool with no output schema, the description supplies what an agent actually needs: eligibility, partial-update behavior, input shape reference, and the fact that a result (savedAt and diff blocks) comes back. Nothing material is left to inference.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: components must be the page's blocks in their target variant state and in the same shape as update_draft, and omitted blocks inherit from the live page. That clarifies the semantics of the optional fields/components beyond the schema's own field descriptions.

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 and resource ("Change a draft experiment's variant"), constrains it to variant keys b/c/d, and makes clear variant a is out of scope. It also anchors the input shape to a named sibling (update_draft), so an agent can distinguish this from update_draft and update_seo_fields 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?

Gives a hard precondition ("Only experiments that haven't started can change") and explains the partial-update contract ("Blocks you leave unchanged keep following the live page"). It stops short of an explicit when-to-use-this-vs-update_draft routing sentence, but the draft/started distinction supplies usable context.

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