> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feature flag tools

> MCP tools for feature flags, their rules, variations, and variables.

Feature flag tools control how a flag delivers a feature in each environment. Your assistant can turn a flag on or off, add rules that roll it out or test it, and define the variations and typed variables that the flag serves.

## Tools

### Feature flags

| Tool | Description | Example prompt |
| - | - | - |
| `feature_flag_list` | Find feature flags by key, name, or ID. | "List all feature flags for site `d1alzzxd7k`." |
| `feature_flag_get` | Retrieve a flag's full configuration in an environment: variations, variables, primary goal, and rule chain. | "Show configuration for flag `snake_game`." |
| `feature_flag_create` | Create a flag with default `on` and `off` variations. | "Create a flag `ui_refresh` for site `d1alzzxd7k`." |
| `feature_flag_duplicate` | Clone an existing flag (the copy starts off in every environment). | "Duplicate the `new_search` flag." |
| `feature_flag_delete` | Permanently delete a flag and all of its configuration. | "Delete the flag `ui_refresh`." |
| `feature_flag_enable` | Turn the per-environment master switch ON so the SDK evaluates rules. | "Turn on `new_search` in production." |
| `feature_flag_disable` | Turn the per-environment master switch OFF (the rule chain stays intact). | "Turn off `new_search` in staging." |
| `feature_flag_activity_logs_get` | Read the audit trail of flag changes (who changed what, and when). | "Show the recent change history for these feature flags." |
| `feature_flag_experiment_results_get` | Fetch statistical results for every goal attached to a flag's experimentation rule. Accepts the same `breakdown`, `filters`, date, `statisticalMethod`, `conversionType`, and `referenceVariationId` settings as `experiment_results_get`. | "Get the experiment results for the rule on `new_search`." |

### Rules, variations, and variables

Shape how a flag delivers value to users: add delivery and experimentation rules, and define the variations and typed variables it serves.

| Tool | Description | Example prompt |
| - | - | - |
| `feature_flag_rule_targeted_create` | Add a targeted delivery rule: serve one variation to a percentage of traffic, with a scheduled start. | "Roll `new_search` out to 20% in production." |
| `feature_flag_rule_progressive_create` | Add a progressive delivery rule that raises a variation's exposure in fixed steps, for a gradual rollout without statistical comparison. | "Roll `new_search` out in production from 5% to 100%, adding 10% every day." |
| `feature_flag_rule_experimentation_create` | Add an A/B experimentation rule that splits traffic across variations with statistical tracking. | "A/B test `off` vs `on` 50/50 on `new_search`." |
| `feature_flag_variation_create` | Add a custom variation (a named state of the feature) to a flag. | "Add a `variant_a` variation to `new_search`." |
| `feature_flag_variable_create` | Define a typed variable (BOOLEAN, NUMBER, STRING, JSON, JS, CSS, ENUM) with a default value. | "Add a STRING variable `label` defaulting to `Search`." |
| `feature_flag_variation_variable_set` | Override a variable's value for one specific variation. | "Set `label` to `Find` on `variant_a`." |

## Parameters

Use the exact parameter names that `tools/list` returns.

### Feature flags

| Tool | Required parameters | Optional parameters |
| - | - | - |
| `feature_flag_list` | None | `siteCode`, `filterQuery`, `page`, `perPage`, `sortField`, `sortOrder` |
| `feature_flag_get` | `featureKey`, `siteCode` | `environmentKey` (`*` for all environments) |
| `feature_flag_create` | `siteCode`, `featureKey`, `name` | `description` |
| `feature_flag_duplicate` | `featureKey`, `siteCode` | None |
| `feature_flag_delete` | `featureKey`, `siteCode` | `confirm` (required to apply the change) |
| `feature_flag_enable` | `featureKey`, `siteCode`, `environmentKey` | `confirm` (required to apply the change) |
| `feature_flag_disable` | `featureKey`, `siteCode`, `environmentKey` | `confirm` (required to apply the change) |
| `feature_flag_activity_logs_get` | None | `type`, `sortKey` (`timestamp`), `sortOrder`, `page`, `perPage` |
| `feature_flag_experiment_results_get` | `featureKey`, `siteCode`, `environmentKey`, `experimentId` | `goalIds`, `audienceBasis` (`VISITORS` by default, or `VISITS`), `includeRawReport`, `breakdown`, `filters`, `dateFrom`, `dateTo`, `statisticalMethod`, `conversionType`, `referenceVariationId` (a variation ID or key, `0` or `off` for the off variation); values as for `experiment_results_get` |

### Rules, variations, and variables

| Tool | Required parameters | Optional parameters |
| - | - | - |
| `feature_flag_rule_targeted_create` | `siteCode`, `featureKey`, `environmentKey`, `variationKey`, `exposition`, `releaseDateTime`, `timeZone` | `ruleName`, `confirm` (required when the flag is already enabled in the environment) |
| `feature_flag_rule_progressive_create` | `siteCode`, `featureKey`, `environmentKey`, `variationKey`, `startExposition`, `stopExposition`, `increaseBy`, `frequencyValue`, `frequencyUnit` (`MINUTES`, `HOURS`, or `DAYS`), `releaseDateTime`, `timeZone` | `ruleName`, `confirm` (required when the flag is already enabled in the environment) |
| `feature_flag_rule_experimentation_create` | `siteCode`, `featureKey`, `environmentKey`, `controlVariationKey`, `trafficAllocations`, `exposition`, `releaseDateTime`, `timeZone` | `ruleName`, `confirm` (required when the flag is already enabled in the environment) |
| `feature_flag_variation_create` | `siteCode`, `featureKey`, `variationKey`, `variationName` | None |
| `feature_flag_variable_create` | `siteCode`, `featureKey`, `variableKey`, `variableType`, `defaultValue` | None |
| `feature_flag_variation_variable_set` | `siteCode`, `featureKey`, `variationKey`, `variableKey`, `value` | None |

**Accepted enum values:** `variableType` is `BOOLEAN`, `NUMBER`, `STRING`, `JSON`, `JS`, `CSS`, or `ENUM`. `trafficAllocations` is a comma-separated `variationKey:percentage` string that sums to 100 (for example `off:50,on:50`). `releaseDateTime` is an ISO-8601 local datetime without offset (for example `2026-07-01T09:00:00`) and `timeZone` is an IANA zone (for example `Europe/Paris` or `UTC`). `frequencyUnit` is `MINUTES`, `HOURS`, or `DAYS`.

> [!TIP]
>
> For environment-specific queries, pass `environmentKey = "production"` or `environmentKey = "staging"` where supported.
