Turn Feature Flag On or Off
toggle_feature_flagQuick-toggle a feature flag on or off by its KEY (no id lookup needed — this tool resolves it). enabled: true sets state="on", false sets state="off". Does not touch the flag's rule, values or schedule — for those use update_feature_flag. Fails with FLAG_NOT_FOUND when no flag has the given key, and with FLAG_HAS_TARGETING when the flag is state=on-with-rule and you try to turn it on, since that would widen it from the rule's audience to everyone — use update_feature_flag explicitly for that. Every gate in app code is a flag: flags are the standard way to control a route, an API endpoint, a feature or a piece of code. A feature a plan sells is also listed on the plan, and the flag's rule points at bridge:billing.entitlement.. Access by who someone is is a rule on a privilege (preferred) or a role; app code never reads a role, privileges, the plan or a plan feature itself. Numbers are plan quotas, not flags; permission on one specific record stays in app code. Full rule: get_integration_guide topic=fit-together. The result carries warnings when the flag cannot mean what it looks like — switched on while its onValue is false, or a rule on a plan or role the app does not have. A warning never blocks the write; read it and fix the flag. Before writing app code that consumes this, call get_integration_guide with topic=feature-flags and the framework the app uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Id of the Bridge app to act on for this call (see list_apps). Omit to use the current app. | |
| key | Yes | Flag KEY to switch (see list_feature_flags). | |
| enabled | Yes | true = on, false = off. |