Skip to main content
Glama
severity1

terraform-cloud-mcp

list_variables_in_variable_set

Retrieve all variables and their configurations from a specific Terraform Cloud variable set to manage infrastructure settings.

Instructions

List all variables in a variable set.

Retrieves all variables that belong to a specific variable set, including their configuration and values.

API endpoint: GET /varsets/{varset_id}/relationships/vars

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

Returns: List of variables in the variable set with their configuration

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
varset_idYes

Implementation Reference

  • The main handler function that executes the tool: lists all variables in a Terraform Cloud variable set by making a GET API request to /varsets/{varset_id}/relationships/vars endpoint.
    @handle_api_errors
    async def list_variables_in_variable_set(varset_id: str) -> APIResponse:
        """List all variables in a variable set.
    
        Retrieves all variables that belong to a specific variable set,
        including their configuration and values.
    
        API endpoint: GET /varsets/{varset_id}/relationships/vars
    
        Args:
            varset_id: The ID of the variable set (format: "varset-xxxxxxxx")
    
        Returns:
            List of variables in the variable set with their configuration
    
        See:
            docs/tools/variables.md#list-variables-in-variable-set for reference documentation
        """
        endpoint = f"varsets/{varset_id}/relationships/vars"
        return await api_request(endpoint, method="GET")
  • Registers the list_variables_in_variable_set tool in the MCP server using FastMCP's mcp.tool() decorator.
    mcp.tool()(variables.list_variables_in_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 the full burden. It states the tool retrieves variables 'including their configuration and values', which hints at read-only behavior, but doesn't explicitly confirm it's non-destructive or safe. It also lacks details on rate limits, authentication needs, pagination, or error handling. The API endpoint mention adds some context but isn't sufficient behavioral disclosure for a tool with no annotations.

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: the first sentence states the core purpose, followed by elaboration. The 'Args' and 'Returns' sections are structured but slightly verbose. The 'See' reference is helpful but could be integrated more seamlessly. Overall, it's efficient with minimal waste.

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 the tool's low complexity (1 parameter, no output schema, no annotations), the description is moderately complete. It covers the basic purpose, parameter semantics, and return type ('List of variables in the variable set with their configuration'). However, it lacks usage guidelines, full behavioral transparency, and details on output structure (e.g., what fields 'configuration' includes), leaving gaps for an agent to use it effectively without external docs.

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

Parameters3/5

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

The description adds meaningful context for the single parameter: it explains that 'varset_id' is 'The ID of the variable set' and provides the format 'varset-xxxxxxxx'. Since schema description coverage is 0% (the schema only has a title 'Varset Id' with no description), this compensates well. However, it doesn't elaborate on where to obtain this ID or validation rules, keeping it at a baseline level.

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 tool's purpose: 'List all variables in a variable set' and 'Retrieves all variables that belong to a specific variable set'. It uses specific verbs ('list', 'retrieves') and identifies the resource ('variables in a variable set'). However, it doesn't explicitly differentiate from sibling tools like 'list_variable_sets' or 'list_workspace_variables', which would be needed for a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_variable_set' (which might retrieve metadata without variables) or 'list_ariable_sets' (which lists sets rather than variables within them). There's also no context about prerequisites (e.g., needing a valid variable set ID) 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