Skip to main content
Glama
severity1

terraform-cloud-mcp

unassign_variable_set_from_workspaces

Remove a variable set from specific workspaces to stop those variables from being available in those workspaces.

Instructions

Remove a variable set from one or more workspaces.

Removes the variable set assignment from the specified workspaces. The variables will no longer be available in those workspaces.

API endpoint: DELETE /varsets/{varset_id}/relationships/workspaces

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") workspace_ids: List of workspace IDs (format: ["ws-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/variables.md#unassign-variable-set-from-workspaces for reference documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
varset_idYes
workspace_idsYes

Implementation Reference

  • The handler function that unassigns a variable set from specified workspaces by sending a DELETE request to the Terraform Cloud API endpoint /varsets/{varset_id}/relationships/workspaces with the list of workspace relationships in the payload.
    @handle_api_errors
    async def unassign_variable_set_from_workspaces(
        varset_id: str, workspace_ids: List[str]
    ) -> APIResponse:
        """Remove a variable set from one or more workspaces.
    
        Removes the variable set assignment from the specified workspaces. The variables
        will no longer be available in those workspaces.
    
        API endpoint: DELETE /varsets/{varset_id}/relationships/workspaces
    
        Args:
            varset_id: The ID of the variable set (format: "varset-xxxxxxxx")
            workspace_ids: List of workspace IDs (format: ["ws-xxxxxxxx", ...])
    
        Returns:
            Empty response with HTTP 204 status code if successful
    
        See:
            docs/tools/variables.md#unassign-variable-set-from-workspaces for reference documentation
        """
        # Build relationships payload
        relationships_data = []
        for workspace_id in workspace_ids:
            relationships_data.append({"type": "workspaces", "id": workspace_id})
    
        payload = {"data": relationships_data}
        endpoint = f"varsets/{varset_id}/relationships/workspaces"
        return await api_request(endpoint, method="DELETE", data=payload)
  • The registration of the tool in the MCP server using FastMCP's tool decorator, referencing the handler from the variables module.
    mcp.tool(**write_tool_config)(variables.unassign_variable_set_from_workspaces)
Behavior4/5

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

Annotations indicate readOnlyHint=false (mutation), which aligns with the description's 'Remove' action. The description adds valuable behavioral context: it specifies the API endpoint (DELETE), mentions the empty response with HTTP 204 status, and references external documentation. This goes beyond what annotations provide.

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 well-structured with clear sections (purpose, effect, API endpoint, args, returns, see). It is appropriately sized but could be slightly more front-loaded; the API endpoint detail might be less critical upfront.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the mutation nature (annotations: readOnlyHint=false), 2 parameters with no schema descriptions, and no output schema, the description is complete: it explains the action, parameters, response, and provides a documentation reference. It adequately covers the tool's context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by documenting both parameters: 'varset_id' (ID of the variable set with format) and 'workspace_ids' (list of workspace IDs with format). It provides clear semantic meaning beyond the bare schema.

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 ('Remove a variable set from one or more workspaces') and distinguishes it from siblings like 'unassign_variable_set_from_projects' by specifying workspace targets. It explains the effect ('variables will no longer be available in those workspaces'), providing a complete purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the effect statement, but does not explicitly state when to use this tool versus alternatives like 'unassign_variable_set_from_projects' or 'assign_variable_set_to_workspaces'. It lacks explicit guidance on prerequisites or exclusions.

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