Skip to main content
Glama
splithub-io

SplitHub

Official

splithub_experiment_create

Add a new A/B test experiment to splithub.config.ts with variants, goals, traffic allocation, and status. Set it to running to go live on deployment or draft to hold it.

Instructions

Add an experiment to splithub.config.ts (checked by reloading the file). It is written as running: it goes live when the code is deployed (and pushed in cloud mode). Tell the user that, and that splithub_experiment_status paused holds it. Pass status draft only when the user asks to hold it. kind: value (text/number/URL read with useValue), component (/ markup), redirect (match path + per-variant destination), mvt (factors instead of variants, every combination compared, read with useValue as { factor: value }). First variant / first level is the control. In an app (React Native, Expo) redirect does nothing, and the config ships inside the build: the variants' code needs a release, then starting, pausing and weights apply live from the cloud; target new builds with an app_version gte condition in the flow. goodSample: total visitors at which the sample counts as good (default 5000). minDays: opt-in fewest days before a verdict (default 0 = none). Then wire the returned snippet, call splithub_doctor and splithub_refs. The loop: splithub_plan → splithub_experiment_create → wire the code → splithub_doctor → splithub_push (cloud) → splithub_results (re-check after daysToVerdict days) → splithub_experiment_status finished → splithub_ship.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesexperiment key, lowercase
toNoredirect experiments: variant → destination path
endNoISO date the experiment ends
goalNothe goal: any event name the app sends with track() (signup, Video Played) or a goal key from the config; an event not in goals becomes a goal, nothing to declare first
kindYes
nameNohuman name shown instead of the key; can be renamed later, the key stays
layerNomutual exclusion: experiments in one layer never share a visitor; bucket ranges [start, end) must not overlap
matchNoredirect experiments: the path it runs on, e.g. /
startNoISO date the experiment starts
statusNo
valuesNovalue experiments: variant → value
factorsNomvt only: factor → level → value, e.g. { headline: { old: "Old", new: "New" }, button: { blue: "#2563eb", green: "#16a34a" } }; first level = control; at most 4 factors × 4 levels
minDaysNoopt-in fewest days before a verdict (default 0 = none); verdicts otherwise depend on sample size
trafficNopercent of visitors in the experiment (default 100)
weightsNorelative weights, same order as variants (not for mvt)
variantsNovariant keys, first = control (not for mvt)
secondaryNogoals (event names or goal keys) to watch next to the primary goal
goodSampleNototal visitors at which verdict.sample.quality turns good (default 5000); informational, never changes the verdict
guardrailsNogoals (event names or goal keys) that must not get worse; { goal, worse: "higher" } when a rise is bad (refunds, errors). A breach makes the verdict guardrail_breached: do not ship
descriptionNo
maxVisitorsNostop counting after this many visitors

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the file write and reload check, that the experiment is written as running and only goes live on deploy/push, that status paused holds it, and that in an app build redirect is a no-op and variant code requires a release while start/pause/weights apply from the cloud. That is exactly the non-obvious behavior an agent would otherwise get wrong.

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

Conciseness3/5

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

Front-loaded and information-dense, but it is a single run-on block mixing purpose, parameter semantics, app caveats and a workflow chain, with no structural grouping. The goodSample and minDays sentences largely restate schema text (and drop the schema's more useful 'informational, never changes the verdict'), so they do not fully earn their place.

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?

For a 21-parameter mutation with no annotations and no output schema, the description covers the essential: what is written, when it takes effect, app-mode limitations, and that a snippet is returned and must be wired. It could go further on failure modes (duplicate key, invalid layer ranges) and on how the snippet is consumed, but the schema carries the parameter detail.

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 86% so the baseline is 3, and the description earns above that by explaining the otherwise opaque kind enum ('value ... read with useValue', 'component markup', 'redirect = match path + per-variant destination', 'mvt = factors instead of variants, every combination compared') and by defining control selection ('First variant / first level is the control'). It leaves unaddressed parameters (layer, guardrails, traffic, maxVisitors) entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+location: 'Add an experiment to splithub.config.ts (checked by reloading the file)'. This tells the agent exactly what artifact is mutated, but it never distinguishes itself from the sibling splithub_create_experiment, whose name suggests the same action — an ambiguity the description leaves unresolved.

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?

Strong conditional guidance: 'Pass status draft only when the user asks to hold it', the app-mode caveat, and the explicit lifecycle 'splithub_plan → splithub_experiment_create → wire the code → splithub_doctor → splithub_push' with follow-up calls named. It stops short of the sibling-differentiation case (splithub_create_experiment) and does not say what to do if the experiment key already exists.

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