Skip to main content
Glama

force_execute_run

Prioritize urgent Terraform Cloud runs by canceling queued runs to unlock the workspace and execute immediately.

Instructions

Forcefully execute a run by canceling all prior runs

Prioritizes a specific run by canceling other queued runs to unlock the workspace, equivalent to clicking "Run this plan now" in the UI. Use this when a run is stuck in the pending queue but needs immediate execution due to urgency or priority over other queued runs.

API endpoint: POST /runs/{run_id}/actions/force-execute

Args: run_id: The ID of the run to execute (format: "run-xxxxxxxx")

Returns: Status update confirming the run has been promoted to active status, with information about which runs were canceled to allow execution

See: docs/tools/run.md for reference documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes

Implementation Reference

  • The core handler function for the 'force_execute_run' tool. It makes a POST request to the Terraform Cloud API endpoint /runs/{run_id}/actions/force-execute to prioritize and execute the specified run by canceling prior queued runs.
    @handle_api_errors async def force_execute_run(run_id: str) -> APIResponse: """Forcefully execute a run by canceling all prior runs Prioritizes a specific run by canceling other queued runs to unlock the workspace, equivalent to clicking "Run this plan now" in the UI. Use this when a run is stuck in the pending queue but needs immediate execution due to urgency or priority over other queued runs. API endpoint: POST /runs/{run_id}/actions/force-execute Args: run_id: The ID of the run to execute (format: "run-xxxxxxxx") Returns: Status update confirming the run has been promoted to active status, with information about which runs were canceled to allow execution See: docs/tools/run.md for reference documentation """ # Make API request return await api_request(f"runs/{run_id}/actions/force-execute", method="POST")
  • The registration of the 'force_execute_run' tool in the MCP server using the FastMCP tool decorator with write permissions configuration.
    mcp.tool(**write_tool_config)(runs.force_execute_run)

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/severity1/terraform-cloud-mcp'

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