Skip to main content
Glama

apply_plan

Execute an approved Power BI/Fabric change plan with dry-run simulation, per-step confirmation, and automatic rollback on step failure.

Instructions

Execute an approved plan with automatic rollback on step failure.

Use this tool when the user asks to:

  • Execute or apply an approved plan created by plan_change.

  • Run plan steps in dry-run mode before modifying actual files.

  • Approve each step individually before it runs.

Args: plan_id: ID of the plan previously created by plan_change. dry_run: If True (DEFAULT), simulate execution without modifying files or cloud resources. Pass dry_run=False explicitly to apply for real. confirm_each_step: If True, ask the user to approve every step before it runs. Declining (or having no interactive client) stops execution and reports the remaining steps as not run.

Returns: ApplyResult with execution status, executed steps, and rollback details if needed.

Input Schema

NameRequiredDescriptionDefault
dry_runNo
plan_idYes
confirm_each_stepNo

Output Schema

NameRequiredDescriptionDefault
resultNosuccess
failed_stepNo
executed_stepsNo
rollback_handleNo
artifacts_changedNo
rollback_steps_executedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.18.0
    • changedInput schema / properties / dry_run / default
      Previous value: -falseNew value: +true
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses automatic rollback on step failure, that dry_run defaults to True (safe-by-default), and that declining a step or lacking an interactive client halts execution and reports remaining steps as not run. It omits auth/permission requirements and what state rollback restores.

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?

Well front-loaded: purpose first, then usage, then Args and Returns. The Returns section is largely redundant given an output schema exists, which is the only wasted content.

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 3-parameter execution tool with no annotations, the definition covers purpose, every parameter's semantics and defaults, failure/rollback behavior, and interactive-client edge cases. An agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: plan_id is tied to plan_change, dry_run is documented with its default and the instruction to pass False explicitly for real application, and confirm_each_step's interactive and no-client behavior is spelled out.

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+resource ('Execute an approved plan') and adds a distinctive behavioral trait ('automatic rollback on step failure'). It implicitly and correctly positions itself downstream of plan_change, letting an agent distinguish it from the plan-creation sibling.

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

Usage Guidelines4/5

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

Provides explicit when-to-use bullets (execute an approved plan, run dry-run, approve each step) and names plan_change as the origin of the required plan_id. It never states when NOT to use it or what alternative to pick if no approved plan exists, so it stops short of full routing guidance.

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