Skip to main content
Glama

apply_plan

Execute an approved change plan, with automatic rollback if a step fails. Run steps in dry-run mode first to preview modifications before touching files or cloud resources.

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.

Args: plan_id: ID of the plan previously created by plan_change. dry_run: If True, simulate execution without modifying files or cloud resources. confirm_each_step: Reserved hook for interactive step confirmations.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
plan_idYes
confirm_each_stepNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNosuccess
failed_stepNo
executed_stepsNo
rollback_handleNo
artifacts_changedNo
rollback_steps_executedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does disclose meaningful behavior: automatic rollback on step failure, dry-run non-mutation, and that confirm_each_step is a reserved hook. It stops short of stating permissions/auth requirements or the risk profile of mutating cloud resources, leaving some gaps for a mutation tool.

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 action and its rollback guarantee, then a compact usage list, then Args/Returns. Every section earns its place, though the Args/Returns restatements are somewhat redundant given the schema and output schema already cover them.

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?

An output schema exists so return values need not be explained (the description lightly summarizes ApplyResult anyway). The description covers triggers, params, and dry-run behavior, but omits auth/permission prerequisites expected of a tool that mutates files and cloud resources.

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 0%, so the description must compensate, and it documents all three parameters (plan_id, dry_run, confirm_each_step) with meaning beyond the schema's bare titles. The descriptions are accurate and clarifying, though they add little syntax/format detail beyond what the names imply.

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 (Execute) and resource (an approved plan) plus a key behavioral trait (automatic rollback on failure). It explicitly ties the tool to plan_change, so an agent can distinguish it from the sibling that creates plans rather than running them.

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?

The 'Use this tool when the user asks to' block gives concrete trigger conditions and the dry-run workflow, and it names plan_change as the source of the plan being applied. This routes the agent to the correct sibling and the correct mode without inference.

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