create_force_rule
Set a feature to a specific value for targeted environments using conditions. Use this tool to enforce feature behavior in specific scenarios, ideal for controlled rollouts or conditional overrides.
Instructions
Create a new force rule on an existing feature. If the existing feature isn't apparent, create a new feature using create_feature_flag first. A force rule sets a feature to a specific value for a specific environment based on a condition. For A/B tests and experiments, use create_experiment instead.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
condition | No | Applied to everyone by default. Write conditions in MongoDB-style query syntax. | |
description | No | ||
environments | Yes | ||
featureId | Yes | The ID of the feature to create the rule on | |
fileExtension | Yes | The extension of the current file. If it's unclear, ask the user. | |
value | Yes | The type of the value should match the feature type |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"condition": {
"description": "Applied to everyone by default. Write conditions in MongoDB-style query syntax.",
"type": "string"
},
"description": {
"type": "string"
},
"environments": {
"items": {
"type": "string"
},
"type": "array"
},
"featureId": {
"description": "The ID of the feature to create the rule on",
"type": "string"
},
"fileExtension": {
"description": "The extension of the current file. If it's unclear, ask the user.",
"enum": [
".tsx",
".jsx",
".ts",
".js",
".vue",
".py",
".go",
".php",
".rb",
".java",
".cs"
],
"type": "string"
},
"value": {
"description": "The type of the value should match the feature type",
"type": "string"
}
},
"required": [
"featureId",
"value",
"environments",
"fileExtension"
],
"type": "object"
}