Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

delete_variable

Remove a specific variable from Apache Airflow by providing its key, enabling cleanup of configuration data in Airflow deployments.

Instructions

Delete a variable by key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Implementation Reference

  • The async handler function that implements the 'delete_variable' tool. It calls the Airflow VariableApi to delete the variable by key and returns a textual representation of the response.
    async def delete_variable(key: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = variable_api.delete_variable(variable_key=key) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Defines the list of tools for the variable module, including the tuple for 'delete_variable' used for registration.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (list_variables, "list_variables", "List all variables", True), (create_variable, "create_variable", "Create a variable", False), (get_variable, "get_variable", "Get a variable by key", True), (update_variable, "update_variable", "Update a variable by key", False), (delete_variable, "delete_variable", "Delete a variable by key", False), ]
  • src/main.py:90-92 (registration)
    The loop in main() that registers all tools from imported modules (including variable tools) by calling app.add_tool.
    for func, name, description, *_ in functions: app.add_tool(func, name=name, description=description)
  • The VariableApi instance used by all variable tools, including delete_variable.
    variable_api = VariableApi(api_client)

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/nikhil-ganage/mcp-server-airflow-token'

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