Summary
When creating a multivariate flag via the create-flag MCP tool, there's no way to specify defaults.offVariation (or defaults.onVariation). LaunchDarkly's API auto-assigns the off variation to the last variation in the list, which is unsafe for multivariate flags where variation order has semantic meaning.
Repro
Actual behavior
After creation, defaults.offVariation is 1 (= v4). With targeting OFF in any environment (which is the default state for new flags), the flag serves v4 to everyone. For a versioning flag where v4 doesn't exist yet in code, this would route every request through a non-existent code path.
Expected behavior
Either:
- The
create-flag tool accepts optional defaults.offVariation / defaults.onVariation parameters (mirroring the LD REST API's defaults object), so callers can specify the safe variation explicitly. Preferred.
- The off variation defaults to index
0 (the first variation) rather than the last, with a note in the tool description.
Workaround
The MCP doesn't expose updateOffVariation either — update-targeting-rules rejects that instruction kind. Today the only workaround is to fix the off variation manually in the LaunchDarkly UI per environment, which defeats the purpose of an MCP-driven flag-creation flow.
Related gap
Even after fixing per-env offVariation in the UI, the flag-level defaults.offVariation (the template used when new envs get created) remains pointing at the last variation. There's no MCP path to fix that either. Both should be addressable via the same tool call.
Why this matters
The create-flag skill (launchdarkly-flag-create) recommends multivariate integer flags as the right pattern for things like schema versioning, where variation order encodes meaning ("3 is current, 4 is the next placeholder"). That pattern is unsafe today because the off variation silently defaults to the placeholder.
Summary
When creating a multivariate flag via the
create-flagMCP tool, there's no way to specifydefaults.offVariation(ordefaults.onVariation). LaunchDarkly's API auto-assigns the off variation to the last variation in the list, which is unsafe for multivariate flags where variation order has semantic meaning.Repro
Actual behavior
After creation,
defaults.offVariationis1(=v4). With targeting OFF in any environment (which is the default state for new flags), the flag servesv4to everyone. For a versioning flag wherev4doesn't exist yet in code, this would route every request through a non-existent code path.Expected behavior
Either:
create-flagtool accepts optionaldefaults.offVariation/defaults.onVariationparameters (mirroring the LD REST API'sdefaultsobject), so callers can specify the safe variation explicitly. Preferred.0(the first variation) rather than the last, with a note in the tool description.Workaround
The MCP doesn't expose
updateOffVariationeither —update-targeting-rulesrejects that instruction kind. Today the only workaround is to fix the off variation manually in the LaunchDarkly UI per environment, which defeats the purpose of an MCP-driven flag-creation flow.Related gap
Even after fixing per-env
offVariationin the UI, the flag-leveldefaults.offVariation(the template used when new envs get created) remains pointing at the last variation. There's no MCP path to fix that either. Both should be addressable via the same tool call.Why this matters
The
create-flagskill (launchdarkly-flag-create) recommends multivariate integer flags as the right pattern for things like schema versioning, where variation order encodes meaning ("3 is current, 4 is the next placeholder"). That pattern is unsafe today because the off variation silently defaults to the placeholder.