Skip to main content
Glama

Update Feature Flag

update_feature_flag
Idempotent

Update an existing feature flag by its id (get the id from list_feature_flags). Only the fields you pass are changed. Before writing app code that consumes this, call get_integration_guide with topic=feature-flags and the framework the app uses. 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. 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. Fields: key, description, state (off | on | on-with-rule), valueType (boolean | string | number | json), onValue / offValue (typed JSON values), rule (replaces the whole rule), clearRule: true to remove the rule entirely. A rule is ordered branches of AND-ed conditions, first match wins, else otherwiseValue; the rule argument has the full shape and examples. A feature a plan sells is listed on the plan (add_plan_feature) and the rule points at that list, never at plan names. For who someone is, prefer a privilege rule over a role rule on the role KEY; read the app's real roles with list_roles first. The same rule gives the same answer in the browser and on the NestJS backend. For a plain on/off switch prefer toggle_feature_flag, which works by key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesFlag id from list_feature_flags (this tool addresses flags by id; toggle_feature_flag takes the key).
appNoId of the Bridge app to act on for this call (see list_apps). Omit to use the current app.
keyNoNew flag key. Changing it breaks app code that reads the old key.
ruleNoStructured targeting rule: { branches: [{ conditions: [{ attribute, operator, values }], returnValue }], otherwiseValue, rolloutPct?, groupRef? }. Branches are first-match-wins; conditions in a branch are AND-ed. A feature a plan sells is listed on the plan (add_plan_feature) and the rule points at that list, never at plan names: { "branches": [{ "conditions": [{ "attribute": "bridge:billing.entitlement.analytics", "operator": "eq", "values": [true] }], "returnValue": true }], "otherwiseValue": false }. For who someone is, prefer a privilege rule ({ "attribute": "privileges", "operator": "contains", "values": ["REPORTS_VIEW"] }, which matches that whole key) over a role rule on the role KEY ("user.role" eq "ADMIN"); read the app's real roles with list_roles first. The same rule gives the same answer in the browser and on the NestJS backend.
stateNoThree-state model: off (always offValue), on (always onValue), on-with-rule (evaluate rule).
onValueNoValue returned when state=on (typed per valueType).
offValueNoValue returned when state=off (typed per valueType).
clearRuleNotrue removes the existing rule (sets it to null).
valueTypeNoType of the values this flag returns.
descriptionNoNew description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / offValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
    • addedInput schema / properties / onValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
    • addedInput schema / properties / rule / properties / branches / items / properties / returnValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
    • addedInput schema / properties / rule / properties / otherwiseValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), so the bar is lower. The description adds genuine non-structured context: it discloses that warnings can be returned (flag on while onValue is false, or a rule on a nonexistent plan/role), that warnings never block the write, and that only passed fields are changed. It does not detail partial-failure or error semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and alternatives are front-loaded, but the text is long and repetitive for a single tool. The privilege-vs-role preference and 'plan feature listed on the plan' guidance are each stated twice, and the 'every gate is a flag' philosophy is tangential filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with a nested rule object and no output schema, the description is quite complete: it explains field effects, rule shape behavior, the consumer-side integration path, and the warnings returned. The only thin spot is error/failure behavior, which is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema: the partial-update contract ('Only the fields you pass are changed'), the state three-state semantics, and domain guidance on rule targets (plan features, privileges over role keys, 'numbers are plan quotas, not flags'). Much rule detail is duplicated from the schema, keeping it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Update an existing feature flag by its id') and explicitly distinguishes itself from the sibling toggle_feature_flag ('For a plain on/off switch prefer toggle_feature_flag, which works by key'). The id-vs-key addressing is called out, so an agent can route correctly without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use context: get the id from list_feature_flags, call get_integration_guide with topic=feature-flags before writing consuming app code, read real roles with list_roles first, and use toggle_feature_flag for plain switches. It also names external alternatives (add_plan_feature, get_integration_guide topic=fit-together).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.