Skip to main content
Glama
Featureflip

Featureflip

Official

Add, update, or remove a variation

manage_variation
Destructive

Add, update, or remove a feature flag's variations; update and remove require variation IDs, and removal fails when other flags depend on that variation.

Instructions

Manage a flag's variations. action=add requires key + value; action=update/remove require variationId (get ids via get_flag). Removing a variation fails with VARIATION_HAS_DEPENDENTS if other flags depend on it.

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>",
      "action": "<action>"
    },
    "name": "manage_variation"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoRequired for add; immutable afterwards
flagYesFlag key or id
nameNoDisplay name
valueNoVariation value serialized as a string; required for add
actionYesadd needs key + value; update and remove need variationId
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
descriptionNoWhat this variation means
variationIdNoRequired for update/remove

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Changed6 schema fields changedv0.3.0
    • addedInput schema / properties / action / description
      Added value: +"add needs key + value; update and remove need variationId"
    • addedInput schema / properties / description / description
      Added value: +"What this variation means"
    • addedInput schema / properties / flag / description
      Added value: +"Flag key or id"
    • addedInput schema / properties / name / description
      Added value: +"Display name"
    • addedInput schema / properties / project / description
      Added value: +"Project key"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ActionCapability": {
      +      "description": "One entry in a resource's `_actions` block: may the caller perform it, and if not, why.",
      +      "properties": {
      +        "allowed": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "reason": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "PublicVariationResponse": {
      +      "description": "A single variation on a flag, as returned in Variations.",
      +      "properties": {
      +        "_actions": {
      +          "additionalProperties": {
      +            "anyOf": [
      +              {
      +                "$ref": "#/$defs/ActionCapability"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "description": "Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.",
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "description": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "key": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "value": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/PublicVariationResponse"
      +    },
      +    {
      +      "properties": {
      +        "updated": {
      +          "description": "Id of the updated variation",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "updated"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "removed": {
      +          "description": "Id of the removed variation",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "removed"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.6

TDQS

A3.8/5.0
Behavior4/5

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

With destructiveHint=true already supplied, the description adds useful behavioral context: removal can fail with VARIATION_HAS_DEPENDENTS when other flags depend on the variation. This is a concrete failure mode an agent should anticipate. It does not detail audit-log implications, but the schema covers the reason field.

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

Conciseness5/5

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

The description is three tight sentences with no waste. It front-loads the core purpose, then gives action prerequisites, then the dependency failure condition. Every sentence contributes operational information.

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?

The tool has nine parameters, full schema coverage, an output schema, and a destructive annotation. The description covers the key action requirements and one important removal failure mode. It omits some richer mutation context, but is largely complete given the schema and annotations.

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 the schema already documents all nine parameters, including action requirements and variationId. The description reinforces the action-dependent parameters and adds that variation ids come from get_flag. That is helpful but largely repeats structured schema guidance.

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

Purpose4/5

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

The description states that the tool manages a flag's variations and clarifies the add/update/remove actions. It distinguishes the mutation operation from retrieval by pointing to get_flag for variation ids. 'Manage' is somewhat broad, but the action-specific requirements make the purpose clear.

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

Usage Guidelines3/5

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

The description gives action-specific prerequisites: add needs key and value, while update/remove need variationId. It also points to get_flag for retrieving variation ids. However, it does not explicitly say when to choose this tool over related flag mutation tools such as update_flag or delete_flag.

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