Skip to main content
Glama

list_variables_in_variable_set

Retrieve all variables within a specified Terraform variable set, including their configurations and values, using the MCP server’s API endpoint for efficient infrastructure management.

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 core handler function that implements the tool logic by calling the Terraform Cloud API to list variables in a specified variable set.
    @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")
  • The registration of the tool in the MCP server using the mcp.tool() decorator.
    mcp.tool()(variables.list_variables_in_variable_set)

Other Tools

Related 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