Skip to main content
Glama

get_variable

Retrieve the value of a specific variable from Apache Airflow clusters to access configuration data or parameters for workflow management.

Instructions

[Tool Role]: Gets the value of a specific variable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variable_keyYes

Implementation Reference

  • The core handler implementation for the 'get_variable' tool. This async function fetches the Airflow variable value via the API endpoint /variables/{variable_key} using the shared airflow_request function and returns the JSON response.
    @mcp.tool() async def get_variable(variable_key: str) -> Dict[str, Any]: """[Tool Role]: Gets the value of a specific variable.""" resp = await airflow_request("GET", f"/variables/{variable_key}") resp.raise_for_status() return resp.json()
  • Registration of the get_variable tool (via register_common_tools call) for Airflow API v1 compatibility.
    common_tools.register_common_tools(mcp)
  • Registration of the get_variable tool (via register_common_tools call) for Airflow API v2 compatibility.
    common_tools.register_common_tools(mcp)

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