Skip to main content
Glama

apply_plan

Creates a Flagsmith experiment from a plan: flag, variants, metrics, and a 0% live rollout, refusing if the plan's control differs from the current flag value. Safe to repeat.

Instructions

Create the multivariate flag, keyed variants, metrics and experiment in Flagsmith from a plan. The experiment is created with a live rollout of 0%, so no user is served a variant until it is started. Refuses if the plan's control is not what the flag serves today. Safe to repeat.

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": {
      "plan": "<plan>"
    },
    "name": "apply_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
planYesAn experiment plan.
dry_runNoOnly report what would be created.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare write/open-world/non-destructive; the description adds meaningful behavior beyond that — the created experiment starts at 0% rollout so no user is served until start_experiment is called, the call fails on control mismatch, and the operation is idempotent. It stops short of describing permission requirements or partial-failure behavior when some artifacts exist already.

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?

Four short sentences, front-loaded with the action, then the safety default, the failure precondition, and the idempotency note in descending order of importance. Nothing is redundant and no sentence merely restates the tool name.

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?

For a complex nested-plan write tool this covers the operationally critical facts (safe default rollout of 0%, refusal condition, repeatability). The remaining gap is that no output schema exists and the description never says what the call returns — notably what dry_run reports — which would help an agent interpret the result.

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?

With 100% schema description coverage the nested plan fields (variants, metrics, assumptions, rollout_percentage) are already documented inline, so the schema carries the load. The description only gestures at the plan parameter ('from a plan') and never addresses dry_run, whose behavior is meaningful to an agent choosing how to call it.

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 opens with a specific verb and enumerates the resources created (multivariate flag, keyed variants, metrics, experiment) in a named system, Flagsmith. This clearly separates it from read/status siblings like list_experiments or decision_status, though it never names the validation siblings (check_plan, preflight) it complements.

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?

Usage context is implied rather than stated: 'Refuses if the plan's control is not what the flag serves today' signals that a plan must match current flag state, and 'Safe to repeat' tells the agent it can retry. However, there is no explicit instruction to run check_plan/preflight first, nor any statement of when not to use this tool.

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