Skip to main content
Glama

Assign experiment cells

assign_cells
Read-only

Deterministically assigns unit IDs to experiment arms using a salted SHA-256 hash, ensuring consistent bucketing for the same salt and unit without writing an experiment record.

Instructions

Assign units to arms with a salted SHA-256 bucket.

Arms are ordered by name. The same salt and unit id always map to the same arm. This does not write an experiment record.

Input Schema

NameRequiredDescriptionDefault
saltYesExperiment salt. Changing it reassigns units.
splitsYesArm name to traffic weight. Weights must sum to 1.
unit_idsYesStable unit ids, usually customer ids.

Output Schema

NameRequiredDescriptionDefault
saltYes
countsYes
arm_orderYes
assignmentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds genuinely new behavioral facts: determinism ('the same salt and unit id always map to the same arm'), ordering ('arms are ordered by name'), and the explicit non-persistence guarantee. It stops short of covering output shape, but an output schema exists, so the remaining gap is minor.

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?

Three short sentences, front-loaded with the core action and mechanism, and no filler. The SHA-256 detail is arguably implementation-level, but it is what justifies the determinism claim, so it earns its place.

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 read-only, three-parameter computation tool with full schema coverage and an output schema, the description covers purpose, determinism, ordering, and the non-write guarantee. Nothing an agent needs in order to invoke it correctly is missing.

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 would be 3, but the description adds real meaning: it explains the stability contract between salt and unit id and clarifies that splits are matched against name-ordered arms. That ties the three parameters together in a way the schema alone does not.

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 ('Assign units to arms') plus the mechanism ('salted SHA-256 bucket'), which immediately separates it from siblings like check_srm, analyze_lift, or create_experiment. An agent can tell this is a deterministic assignment computation, not an experiment mutation.

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?

The negative guidance 'This does not write an experiment record' usefully implies this is a compute/preview step rather than a persistence step, but it never names an alternative or states the condition under which an agent should call this versus create_experiment or check_srm. Usage is only inferable, not spelled out.

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