Skip to main content
Glama

Create Feature Flag

create_feature_flag

Create a new feature flag. 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. Arguments: key (required — the identifier code reads, e.g. "beta-ui"), description, state (off | on | on-with-rule; defaults to off), valueType (boolean | string | number | json; defaults to boolean), onValue / offValue (the typed values returned in the on / off states — real JSON values, e.g. true, "variant-b", 42, or an object), and rule for state=on-with-rule. 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. Use update_feature_flag to change an existing flag, and toggle_feature_flag for a quick on/off switch by key.

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.
keyYesFlag KEY the app code reads, e.g. "beta-ui". Lower-case with dashes.
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).
valueTypeNoType of the values this flag returns.
descriptionNoWhat the flag controls, for the people who manage it.

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.5/5.0
Behavior4/5

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

Annotations cover the safety profile (write, non-destructive, non-idempotent), and the description adds genuinely new behavior: a `warnings` result that never blocks the write, and the guidance to read and fix the flag. It does not disclose auth/permission requirements or creation side effects, but the warning semantics are real value beyond the annotations.

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 prerequisite are front-loaded, but the middle is bloated with doctrine that is restated in the `rule` schema description (same privilege-vs-role example, same plan-feature guidance, same browser/backend sentence). Sentences earn their place individually but the overall block is longer than needed to select and invoke the tool.

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 an 8-parameter tool with a nested rule object and no output schema, the description supplies the mental model, the prerequisite call, the warning behavior on the result, and the sibling routing. Nothing an agent needs to call it correctly 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 3 baseline applies, but the description goes further with argument-level meaning: key example ("beta-ui"), state three-state model, valueType defaults, on/off value typing, and rule semantics (first-match-wins, AND-ed conditions). Much of the rule detail duplicates the schema, but the conceptual framing (privilege vs role, pointing at plan feature lists not plan names) adds interpretable meaning.

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?

Opens with a specific verb+resource ("Create a new feature flag") and explicitly routes the agent away from siblings: "Use update_feature_flag to change an existing flag, and toggle_feature_flag for a quick on/off switch by key." An agent can distinguish create vs update vs toggle without inspecting 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?

States a concrete prerequisite workflow (call get_integration_guide with topic=feature-flags and the framework before writing consuming code) and names the two alternatives with the condition that selects each. It also explains the warning-handling loop after invocation, so both before/after usage is covered.

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.