Skip to main content
Glama

unlock_workspace

Removes the lock from a Terraform Cloud workspace, enabling the queueing of runs and resuming normal operations after a lock was applied. Requires a workspace ID to execute.

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 sends a POST request to the Terraform Cloud API endpoint /workspaces/{workspace_id}/actions/unlock to remove the lock from the specified workspace.
    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 tool with the MCP server instance using the mcp.tool decorator and applies the write_tool_config for appropriate tool metadata.
    mcp.tool(**write_tool_config)(workspaces.unlock_workspace)
  • Shared configuration dictionary used in tool registration that sets tool metadata including enabled state and readOnlyHint annotation, influencing the tool's schema and behavior hints.
    write_tool_config = { "enabled": not read_only_mode, "annotations": {"readOnlyHint": False} }

Other Tools

Related 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