Skip to main content
Glama
Featureflip

Featureflip

Official

Update flag environment config

update_flag_environment_config
Destructive

Update a feature flag's per-environment serving configuration, including the default variation, serving strategy, and prerequisites, to control how the flag evaluates in a specific environment.

Instructions

Update a flag's per-environment serving config: defaultVariationId (served on fallthrough, required), strategy (SingleVariation | PercentageRollout | TargetedRollout — only SingleVariation is currently supported at the environment level), and prerequisites. Percentage rollouts are configured on targeting rules via update_targeting.

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": {
      "project": "<project>",
      "flag": "<flag>",
      "environment": "<environment>",
      "defaultVariationId": "<defaultVariationId>"
    },
    "name": "update_flag_environment_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagYesFlag key or id
reasonNoWhy you are making this change. Recorded in the audit log, and required when the environment (or, for project-wide changes, any environment in the project) is marked critical.
projectYesProject key
strategyNoServing strategy; only SingleVariation is currently supported here
environmentYesEnvironment key, e.g. production
prerequisitesNoFlags that must evaluate to the expected variation before this flag serves. Omit to leave existing prerequisites untouched; pass a list (possibly empty) to replace them wholesale.
freeze_overrideNoOwner/Admin only: break an active change freeze for this one change. Requires `reason`. Use it only after a change_frozen error says can_override is true.
defaultVariationIdYesVariation id to serve on fallthrough — required by the API

Output Schema

NameRequiredDescriptionDefault
flagYes
projectYes
strategyNo
environmentYes
prerequisitesNo
defaultVariationIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.1
    • addedInput schema / properties / freeze_override
      Added value: +{
      +  "description": "Owner/Admin only: break an active change freeze for this one change. Requires `reason`. Use it only after a change_frozen error says can_override is true.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.7.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why you are making this change. Recorded in the audit log, and required when the environment (or, for project-wide changes, any environment in the project) is marked critical.",
      +  "type": "string"
      +}
  3. Changed5 schema fields changedv0.3.0
    • addedInput schema / properties / environment / description
      Added value: +"Environment key, e.g. production"
    • addedInput schema / properties / flag / description
      Added value: +"Flag key or id"
    • addedInput schema / properties / project / description
      Added value: +"Project key"
    • addedInput schema / properties / strategy / description
      Added value: +"Serving strategy; only SingleVariation is currently supported here"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "defaultVariationId": {
      +      "type": "string"
      +    },
      +    "environment": {
      +      "type": "string"
      +    },
      +    "flag": {
      +      "type": "string"
      +    },
      +    "prerequisites": {
      +      "items": {
      +        "properties": {
      +          "expectedVariationKey": {
      +            "type": "string"
      +          },
      +          "prerequisiteFlagKey": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "project": {
      +      "type": "string"
      +    },
      +    "strategy": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "project",
      +    "flag",
      +    "environment",
      +    "defaultVariationId"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.1.6

TDQS

A3.8/5.0
Behavior3/5

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

The only annotation is destructiveHint=true, and the description never explains what is destroyed or made irreversible — it only lists fields. It does add useful context that the environment-level strategy is restricted to SingleVariation and that percentage rollouts live elsewhere, but the audit-log reason requirement, change-freeze behavior, and prerequisite replacement semantics are left entirely to the schema.

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

Conciseness4/5

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

Two dense sentences, front-loaded with the resource and the affected fields, with the routing hint last. The parenthetical enum listing is slightly redundant with the schema but is short and aids scanning; nothing is padding.

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

Completeness3/5

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

An output schema exists and all 8 parameters are fully described, so return values and parameter meaning are covered. What is missing for a destructive mutation is behavioral framing: the description never warns that prerequisites are replaced wholesale, that a reason may be mandatory in critical environments, or that a change freeze can block the call.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including reason, freeze_override, and prerequisites is already documented in structured form. The description restates the meaning of defaultVariationId and the strategy enum without adding syntax, defaults, or constraints beyond the schema, which is the baseline-3 case.

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 and resource ('Update a flag's per-environment serving config') and enumerates the exact fields affected: defaultVariationId, strategy, and prerequisites. It also disambiguates scope (environment-level vs. targeting rules), so an agent can tell it apart from update_targeting and update_flag without opening a schema.

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

Usage Guidelines4/5

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

Explicitly routes percentage-rollout work to update_targeting and notes that only SingleVariation is supported at this level, which is a real when-to-use signal. It does not cover other plausible alternatives (e.g., copy_flag_config for cloning configs across environments) or state prerequisites, but the key boundary is drawn.

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