create_flag_definition
Creates and activates a feature flag definition in a specified environment, including treatments and targeting rules. Supports required title and comments for workspaces that enforce them.
Instructions
Create (activate) a feature flag definition in a specific environment with treatments and targeting rules. For workspaces where list_workspaces reports requiresTitleAndComments: true, pass title (and comment) or the API rejects the write with a 400.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"environment_id": "<environment_id>",
"flag_name": "<flag_name>",
"definition": "<definition>"
},
"name": "create_flag_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Change title. Required for workspaces with requiresTitleAndComments: true | |
| comment | No | Change comment. Required for workspaces with requiresTitleAndComments: true | |
| flag_name | Yes | The feature flag name | |
| definition | Yes | Full flag definition as a JSON string — must include treatments array and defaultRule | |
| workspace_id | Yes | The workspace ID | |
| environment_id | Yes | The environment ID or name |