Skip to main content
Glama
severity1

terraform-cloud-mcp

get_variable_set

Retrieve details for a specific Terraform Cloud variable set including variables, workspace assignments, and configuration to manage infrastructure settings.

Instructions

Get details for a specific variable set.

Retrieves comprehensive information about a variable set including its variables, workspace assignments, and configuration.

API endpoint: GET /varsets/{varset_id}

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx")

Returns: Variable set details including configuration and relationships

See: docs/tools/variables.md#get-variable-set for reference documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
varset_idYes

Implementation Reference

  • The handler function for the 'get_variable_set' tool. It takes a varset_id parameter and makes a GET request to the Terraform Cloud API endpoint `/varsets/{varset_id}` to retrieve the variable set details.
    async def get_variable_set(varset_id: str) -> APIResponse:
        """Get details for a specific variable set.
    
        Retrieves comprehensive information about a variable set including its
        variables, workspace assignments, and configuration.
    
        API endpoint: GET /varsets/{varset_id}
    
        Args:
            varset_id: The ID of the variable set (format: "varset-xxxxxxxx")
    
        Returns:
            Variable set details including configuration and relationships
    
        See:
            docs/tools/variables.md#get-variable-set for reference documentation
        """
        endpoint = f"varsets/{varset_id}"
        return await api_request(endpoint, method="GET")
  • Registration of the 'get_variable_set' tool using the mcp.tool() decorator in the main server file.
    mcp.tool()(variables.get_variable_set)

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