Skip to main content
Glama

Import Feature Flags

import_feature_flags
Idempotent

Apply a "flags as code" bundle: creates flags that do not exist and updates the ones that do, matched by key. Pass the flags array from export_feature_flags (or from the CLI's bridge flag export — same format). Each rule is validated with the same validator create_feature_flag uses, and the whole payload is checked before anything is written, so a bad rule fails the import instead of half-applying it. Set dryRun: true to see exactly what would be created, updated and left alone — including which fields differ — without touching anything; do that first when importing a bundle you did not just export. This tool NEVER deletes: flags that exist remotely but are absent from the bundle are reported as extraneous for you to remove deliberately with delete_feature_flag. Before writing app code that consumes this, call get_integration_guide with topic=feature-flags and the framework the app uses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoId of the Bridge app to act on for this call (see list_apps). Omit to use the current app.
flagsYesThe flag documents to apply: { key, description?, state?, valueType?, onValue?, offValue?, rule?, schedule? }. This is the `flags` array from export_feature_flags.
dryRunNotrue reports the diff and writes nothing. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / flags / items / properties / offValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
    • addedInput schema / properties / flags / items / properties / onValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean",
      +  "object",
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / flags / items / properties / rule / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "branches": {
      -        "default": [],
      -        "description": "Ordered branches, first-match-wins.",
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "conditions": {
      -              "description": "Conditions AND-ed together; the branch matches when all hold.",
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "attribute": {
      -                    "minLength": 1,
      -                    "type": "string"
      -                  },
      -                  "operator": {
      -                    "enum": [
      -                      "eq",
      -                      "neq",
      -                      "contains",
      -                      "not_contains",
      -                      "in",
      -                      "not_in",
      -                      "gt",
      -                      "lt",
      -                      "between",
      -                      "regex",
      -                      "exists",
      -                      "not_exists"
      -                    ],
      -                    "type": "string"
      -                  },
      -                  "values": {
      -                    "description": "Comparison values (always a plural array, even for single-value operators like eq). For between: [min, max]. For exists/not_exists: [].",
      -                    "items": {
      -                      "type": [
      -                        "string",
      -                        "number",
      -                        "boolean",
      -                        "null"
      -                      ]
      -                    },
      -                    "type": "array"
      -                  }
      -                },
      -                "required": [
      -                  "attribute",
      -                  "operator",
      -                  "values"
      -                ],
      -                "type": "object"
      -              },
      -              "type": "array"
      -            },
      -            "returnValue": {
      -              "description": "Value the flag returns when this branch matches (typed per the flag valueType)."
      -            }
      -          },
      -          "required": [
      -            "conditions"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "groupRef": {
      -        "description": "Reference to a saved condition group; mutually exclusive with inline branches.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "otherwiseValue": {
      -        "description": "Value returned when no branch matches (or the identity is excluded by rollout)."
      -      },
      -      "rolloutPct": {
      -        "default": 100,
      -        "description": "0-100; applies to the whole rule. Defaults to 100 (full rollout).",
      -        "maximum": 100,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "branches": {
      +        "default": [],
      +        "description": "Ordered branches, first-match-wins.",
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "conditions": {
      +              "description": "Conditions AND-ed together; the branch matches when all hold.",
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "attribute": {
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  "operator": {
      +                    "enum": [
      +                      "eq",
      +                      "neq",
      +                      "contains",
      +                      "not_contains",
      +                      "in",
      +                      "not_in",
      +                      "gt",
      +                      "lt",
      +                      "between",
      +                      "regex",
      +                      "exists",
      +                      "not_exists"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "values": {
      +                    "description": "Comparison values (always a plural array, even for single-value operators like eq). For between: [min, max]. For exists/not_exists: [].",
      +                    "items": {
      +                      "type": [
      +                        "string",
      +                        "number",
      +                        "boolean",
      +                        "null"
      +                      ]
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "required": [
      +                  "attribute",
      +                  "operator",
      +                  "values"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "returnValue": {
      +              "description": "Value the flag returns when this branch matches (typed per the flag valueType).",
      +              "type": [
      +                "string",
      +                "number",
      +                "boolean",
      +                "object",
      +                "array",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "conditions"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "groupRef": {
      +        "description": "Reference to a saved condition group; mutually exclusive with inline branches.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "otherwiseValue": {
      +        "description": "Value returned when no branch matches (or the identity is excluded by rollout).",
      +        "type": [
      +          "string",
      +          "number",
      +          "boolean",
      +          "object",
      +          "array",
      +          "null"
      +        ]
      +      },
      +      "rolloutPct": {
      +        "default": 100,
      +        "description": "0-100; applies to the whole rule. Defaults to 100 (full rollout).",
      +        "maximum": 100,
      +        "minimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / flags / items / properties / rule / type
      Added value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / flags / items / properties / schedule / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "at": {
      -        "description": "ISO-8601 timestamp at which the transition fires.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "state": {
      -        "$ref": "#/properties/flags/items/properties/state"
      -      }
      -    },
      -    "required": [
      -      "at",
      -      "state"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "at": {
      +        "description": "ISO-8601 timestamp at which the transition fires.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "state": {
      +        "description": "Defaults to \"off\" when omitted.",
      +        "enum": [
      +          "off",
      +          "on",
      +          "on-with-rule"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "at",
      +      "state"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / flags / items / properties / schedule / type
      Added value: +[
      +  "object",
      +  "null"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations (which only declare idempotent/non-destructive/non-readonly) by disclosing atomic pre-write validation, that a bad rule fails the whole import rather than half-applying, that the tool NEVER deletes and instead reports extraneous flags, and what dryRun actually returns (created/updated/left-alone plus field diffs). It does not state auth/permission requirements, but the behavioral picture is unusually complete.

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?

Front-loaded with the core upsert behavior, then layered with validation, dryRun, no-delete, and integration-guide guidance. Five sentences is on the long side, but each one carries distinct, non-redundant information; minor trimming of the get_integration_guide aside would tighten it.

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

Completeness5/5

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

For a complex nested upsert tool with no output schema, the description covers the write model, atomicity, dry-run diff semantics, deletion policy, and cross-tool workflow. An agent has everything needed to invoke it safely and interpret the outcome without an output schema.

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 the baseline is 3, but the description adds real meaning beyond the schema: it identifies the exact source and shape of the `flags` payload (the array from export_feature_flags / CLI bridge flag export) and explains dryRun's diff output including which fields differ.

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 (apply/import a flags-as-code bundle) and immediately defines the upsert semantics: creates missing flags, updates existing ones, matched by key. This clearly separates it from create_feature_flag, update_feature_flag, and export_feature_flags, which it explicitly names.

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?

Explicit when-to-use guidance: set dryRun first when importing a bundle you did not just export; use delete_feature_flag for extraneous flags rather than this tool; call get_integration_guide before writing app code. It names alternatives and the conditions that select them.

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.