Skip to main content
Glama

list_variables

Retrieve all variables stored in Apache Airflow for configuration management and workflow parameter access.

Instructions

[Tool Role]: Lists all variables in Airflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The primary handler function for the 'list_variables' MCP tool. Decorated with @mcp.tool() for automatic registration. Fetches Airflow variables via the REST API with optional pagination parameters (limit and offset).
    @mcp.tool()
    async def list_variables(limit: int = 20, offset: int = 0) -> Dict[str, Any]:
        """[Tool Role]: Lists all variables in Airflow."""
        params = {'limit': limit, 'offset': offset}
        query_string = "&".join([f"{k}={v}" for k, v in params.items()])
        resp = await airflow_request("GET", f"/variables?{query_string}")
        resp.raise_for_status()
        return resp.json()

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/call518/MCP-Airflow-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server