Skip to main content
Glama

execute_plan

Execute implementation plan steps to generate and apply code changes using AI, with modes for single steps, ready steps, or full plan execution.

Instructions

Execute steps from an implementation plan, generating code changes.

This tool orchestrates the execution of plan steps, using AI to generate the actual code changes needed for each step.

Execution Modes:

  • single_step: Execute a specific step by number (requires step_number)

  • all_ready: Execute all steps whose dependencies are satisfied

  • full_plan: Execute steps in dependency order (respects max_steps limit)

Output:

  • Generated code changes for each step (preview by default)

  • Success/failure status for each step

  • Next steps that are ready to execute

  • Overall progress tracking

You can pass a saved plan_id instead of the full plan JSON.

Important:

  • By default, changes are shown as preview only (apply_changes=false)

  • Set apply_changes=true to actually write the generated code to files

  • Use stop_on_failure=true (default) to halt on first error

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planNoThe plan as a JSON string (from create_plan output). Optional if plan_id is provided.
plan_idNoPlan ID to load from saved plans (alternative to providing plan JSON)
modeNoExecution mode (default: single_step)single_step
step_numberNoStep number to execute (required for single_step mode)
apply_changesNoWhether to apply changes to files (default: false - preview only)
max_stepsNoMaximum steps to execute in one call (default: 5)
stop_on_failureNoWhether to stop on first failure (default: true)
additional_contextNoAdditional context to provide to the AI for code generation

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kirachon/context-engine'

If you have feedback or need assistance with the MCP directory API, please join our Discord server