Skip to main content
Glama

assign_experiment_unit

Idempotent

Change one unit's (player's or server's) place in an experiment: pin it to a group (assign), remove a pin (clear_override), take it out of the experiment (unenroll), or put it back (reactivate). Use for QA (put a tester in the treatment) or to exclude a unit. Applies when this runs and takes effect on the unit's next configuration fetch. Only works on scheduled or active experiments. Check the unit's current state with list_experiment_members first. Load the manage-experiments skill (load_skill("manage-experiments")) first.

Input Schema

NameRequiredDescriptionDefault
actionYes`assign`: pin the unit to groupId, overriding the automatic group. `clear_override`: remove a pin so the automatic group applies again. `unenroll`: take the unit out of the experiment (it gets the base configuration). `reactivate`: undo an unenroll.
reasonYesWhy this is being done, in one or two sentences a reviewer can judge it by. Shown to the approver.
groupIdNoRequired for `assign` only.
unitTypeYesMust match the experiment's unit type.
projectIdYesThe project (application) id to scope this call to. Use list_projects to discover valid ids.
distinctIdYesThe unit id: the player's user id for user experiments, the server's JobId for server ones.
environmentYesThe environment name to scope this call to (e.g. 'production'). Use list_projects to discover the names available to this token.
experimentIdYes
ignoreExclusionNoFor `assign` and `reactivate`: place the unit even though it is enrolled across an experiment-exclusion boundary. Only when the user explicitly asks to override it.
ignoreTargetingNoFor `assign`: pin the unit even if it does not match the targeting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare write, idempotent, non-destructive, but say nothing about timing or preconditions. The description adds that the change applies immediately but takes effect on the unit's next configuration fetch, restricts to scheduled/active experiments, and implies an approval workflow via the reviewer-facing reason field — all behavior an agent needs and none of it is in the structured fields.

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 core action and its four modes, then prerequisites, then timing. Every sentence carries information, though the action enumeration partially duplicates the enum descriptions already present in the schema.

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 10 parameters, no output schema, and a mutation that affects live experiment membership, the description covers preconditions, propagation timing, and the workflow entry points. It leaves unstated what the caller gets back and how failures (e.g. unit type mismatch, wrong experiment state) surface, which is the main residual gap.

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 90% and the schema already defines the action enum, groupId's 'required for assign only' rule, the unitType/environment constraints, and the ignore* flags. The description restates the action modes compactly but adds no meaning to the one undocumented parameter (experimentId) and no format details beyond the schema. Baseline 3 is appropriate.

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 one unit's place in an experiment') and then enumerates the four distinct modes (assign, clear_override, unenroll, reactivate) in plain language. An agent can distinguish this from siblings like update_experiment_rollout or terminate_experiment 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 Guidelines5/5

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

Gives concrete use cases ('Use for QA (put a tester in the treatment) or to exclude a unit'), a precondition ('Only works on scheduled or active experiments'), a prerequisite read ('Check the unit's current state with list_experiment_members first'), and a required skill load. When-to-use and alternatives are explicit rather than inferred.

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