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)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'retrieves comprehensive information' and mentions what's included (variables, workspace assignments, configuration), which adds value. However, it doesn't disclose critical behavioral traits like whether it's read-only, requires authentication, has rate limits, or error handling. The API endpoint mention is helpful but insufficient for full transparency.

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 appropriately sized and front-loaded with the core purpose. The additional sections (Args, Returns, See) are structured but slightly verbose; the API endpoint line could be integrated more seamlessly. Overall, most sentences earn their place, though minor trimming is possible.

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

Completeness3/5

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

Given 1 parameter with 0% schema coverage and no output schema, the description does well on parameters but lacks output details. It mentions return content in general terms but doesn't specify structure or examples. For a detail-retrieval tool with no annotations, this leaves gaps in understanding the full behavior and response format.

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?

Schema description coverage is 0%, so the description must compensate fully. It provides the parameter name 'varset_id', specifies its purpose ('The ID of the variable set'), and gives format details ('format: "varset-xxxxxxxx"'), which adds significant meaning beyond the bare schema. This fully compensates for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get details', 'Retrieves') and resource ('variable set'), specifying it's for a specific variable set. It distinguishes from sibling tools like 'list_variable_sets' by focusing on details retrieval rather than listing. However, it doesn't explicitly contrast with other detail-retrieval tools like 'get_workspace_details' beyond the resource type.

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 when details for a specific variable set are needed, but doesn't explicitly state when to use this versus alternatives like 'list_variable_sets' or other detail tools. It mentions the API endpoint format, which provides some context, but 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