Skip to main content
Glama
severity1

terraform-cloud-mcp

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)
Behavior4/5

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

Annotations provide readOnlyHint=false, indicating a write operation. The description adds valuable behavioral context beyond this: it discloses that the tool cancels other queued runs, unlocks the workspace, and prioritizes a specific run. However, it lacks details on permissions, rate limits, or error handling, which would be helpful for a destructive operation.

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?

The description is front-loaded with key information in the first sentence, followed by usage guidelines and technical details. It avoids redundancy, but the inclusion of API endpoint and 'See:' reference could be trimmed for conciseness, as they don't directly aid the AI agent in tool selection.

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?

Given the tool's complexity (destructive operation with workspace implications) and lack of output schema, the description is mostly complete: it explains the action, usage, parameters, and return value. However, it could better address potential side effects or error scenarios to fully guide the agent.

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?

With 0% schema description coverage and 1 parameter, the description compensates by explaining the 'run_id' parameter's purpose ('The ID of the run to execute') and format ('format: "run-xxxxxxxx"'), adding meaning not in the schema. It doesn't cover edge cases or validation rules, but this is sufficient for a single parameter.

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?

The description clearly states the specific action ('forcefully execute a run by canceling all prior runs') and the resource ('run'), distinguishing it from siblings like 'cancel_run', 'force_cancel_run', and 'apply_run'. It explicitly mentions the UI equivalent ('Run this plan now'), providing concrete context.

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 description explicitly states when to use this tool ('when a run is stuck in the pending queue but needs immediate execution due to urgency or priority over other queued runs'), distinguishing it from alternatives. It also implies when not to use it (e.g., for normal execution without force), though alternatives are not named.

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

Install Server

Other Tools

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