Skip to main content
Glama

unlock_workspace

Remove a lock from a Terraform Cloud workspace to enable queuing runs and restore normal operation after previous locking.

Instructions

Unlock a workspace.

Removes the lock from a workspace, allowing runs to be queued. This enables normal operation of the workspace after it was previously locked.

API endpoint: POST /workspaces/{workspace_id}/actions/unlock

Args: workspace_id: The ID of the workspace to unlock (format: "ws-xxxxxxxx")

Returns: The workspace with updated lock status and related metadata

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes

Implementation Reference

  • The core handler function for the unlock_workspace tool. It uses the api_request utility to POST to the Terraform Cloud /workspaces/{workspace_id}/actions/unlock endpoint, decorated with error handling.
    async def unlock_workspace(workspace_id: str) -> APIResponse: """Unlock a workspace. Removes the lock from a workspace, allowing runs to be queued. This enables normal operation of the workspace after it was previously locked. API endpoint: POST /workspaces/{workspace_id}/actions/unlock Args: workspace_id: The ID of the workspace to unlock (format: "ws-xxxxxxxx") Returns: The workspace with updated lock status and related metadata See: docs/tools/workspace.md for reference documentation """ return await api_request(f"workspaces/{workspace_id}/actions/unlock", method="POST")
  • Registers the unlock_workspace handler as an MCP tool using FastMCP's mcp.tool decorator with write_tool_config (enables non-read-only operations).
    mcp.tool(**write_tool_config)(workspaces.unlock_workspace)

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