Skip to main content
Glama
Featureflip

Featureflip

Official

Copy flag config between environments

copy_flag_config
Destructive

Copy a flag's targeting, rules, prerequisites, and default variation between environments; preview changes by default, then apply with matching ETags after review.

Instructions

Copy one flag's targeting (default variation, strategy, rules, prerequisites) from one environment into another. On/off is copied only with include_state: true. Previews by default (dry_run: true) and changes nothing; review before/after, changedSections and warnings, then call again with dry_run: false plus the preview's sourceETag and targetETag as source_etag/target_etag to apply. If the apply is refused with 412, something changed since the preview: preview again. Applying needs both ETags, and the same source and include_state as the preview (the ETags record environment state, not the request). Team plan and above.

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>",
      "source": "<source>",
      "target": "<target>"
    },
    "name": "copy_flag_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.
sourceYesEnvironment key to copy from
targetYesEnvironment key to copy into
dry_runNoPreview only, change nothing (default true). Pass false to apply, with both ETags from a preview made with the same source and include_state
projectYesProject key
source_etagNosourceETag from the preview; the apply is refused (412) if the source changed since
target_etagNotargetETag from the preview; the apply is refused (412) if the target changed since
include_stateNoAlso copy the on/off state (default false). When applying, use the same value as the preview

Output Schema

NameRequiredDescriptionDefault
afterNo
beforeNo
changedNo
warningsNo
sourceETagNo
targetETagNo
changedSectionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.1/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 earns credit for explaining that the default call is a no-op preview and that applying is a real mutation gated on matching ETags with a 412 concurrency check. However, it does not flag the destructive side explicitly (overwriting the target environment's existing targeting is only implied by 'copy into'), and the audit/reason requirement lives in the schema rather than the description.

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 payload definition, then the preview/apply contract, then failure handling — a sensible order with no filler sentences. It is dense (five clauses in the opening sentence) and the ETag explanation is stated twice in slightly different words, so it is efficient rather than immaculate.

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?

An output schema exists, and the description still names the review fields (before/after, changedSections, warnings) so the agent knows to read the preview before applying. Combined with the plan requirement and the 412 recovery path, nothing an agent needs to invoke this correctly across a two-call preview/apply flow is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuine cross-parameter semantics the schema states only in fragments: the ETags must come from a preview made with the same source and include_state, and the ETags record environment state rather than the request. That is real interpretive value for a 9-parameter tool.

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?

States a specific verb (copy) and resource (one flag's targeting: default variation, strategy, rules, prerequisites) and names the exact scope of what transfers vs what doesn't (on/off only with include_state). This is far more precise than the title. It stops short of naming the closest sibling, update_flag_environment_config / update_targeting, so the agent must infer that this is the copy-across-environments path rather than the in-place edit path.

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 an explicit operating procedure: preview first, review before/after/changedSections/warnings, then re-call with dry_run: false plus the ETags. It also states the recovery path for a 412 (re-preview) and the plan gate (Team plan and above), so the agent knows when the tool will fail and why.

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