Skip to main content
Glama
severity1

terraform-cloud-mcp

unassign_variable_set_from_projects

Remove a variable set from Terraform Cloud projects to stop variables from being available in their workspaces.

Instructions

Remove a variable set from one or more projects.

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

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

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") project_ids: List of project IDs (format: ["prj-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
varset_idYes
project_idsYes

Implementation Reference

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

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

Annotations provide readOnlyHint=false, indicating this is a mutation operation. The description adds valuable behavioral context beyond annotations: it specifies this is a DELETE operation with an empty 204 response, describes the effect on variable availability, and references external documentation. No contradiction with annotations exists.

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, API endpoint, args, returns, reference). Each sentence adds value, though the API endpoint detail might be more technical than necessary for an agent. The information is front-loaded with the core purpose first.

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?

For a mutation tool with 2 parameters, 0% schema coverage, and no output schema, the description provides comprehensive coverage: purpose, parameters with formats, API method, response format, and documentation reference. The only minor gap is not explicitly mentioning authentication or error cases, but it's otherwise complete.

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 with their purposes and formats. It explains varset_id identifies the variable set to unassign, and project_ids lists the target projects, including specific ID format examples that aren't in the 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 projects') and the resource affected ('variable set assignment'). It distinguishes from sibling tools like 'assign_variable_set_to_projects' by specifying the opposite operation, and from 'unassign_variable_set_from_workspaces' by targeting projects instead of workspaces.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool: when you need to remove a variable set assignment from projects, making variables unavailable in those projects' workspaces. It doesn't explicitly state when NOT to use it or name specific alternatives, but the context is sufficient for differentiation from similar tools.

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