Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

delete_connection

Remove a connection from Apache Airflow by specifying its unique ID to manage database and external service configurations.

Instructions

Delete a connection by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conn_idYes

Implementation Reference

  • The core handler function that executes the deletion of a connection by calling the Airflow ConnectionApi.
    async def delete_connection(conn_id: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = connection_api.delete_connection(connection_id=conn_id) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registers the delete_connection tool (line 18) among other connection tools by including it in the list returned for MCP tool 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_connections, "list_connections", "List all connections", True), (create_connection, "create_connection", "Create a connection", False), (get_connection, "get_connection", "Get a connection by ID", True), (update_connection, "update_connection", "Update a connection by ID", False), (delete_connection, "delete_connection", "Delete a connection by ID", False), (test_connection, "test_connection", "Test a connection", True), ]
  • src/main.py:7-26 (registration)
    Imports the get_all_functions from connection.py and maps APIType.CONNECTION to it in the central APITYPE_TO_FUNCTIONS dictionary used for tool registration.
    from src.airflow.connection import get_all_functions as get_connection_functions from src.airflow.dag import get_all_functions as get_dag_functions from src.airflow.dagrun import get_all_functions as get_dagrun_functions from src.airflow.dagstats import get_all_functions as get_dagstats_functions from src.airflow.dataset import get_all_functions as get_dataset_functions from src.airflow.eventlog import get_all_functions as get_eventlog_functions from src.airflow.importerror import get_all_functions as get_importerror_functions from src.airflow.monitoring import get_all_functions as get_monitoring_functions from src.airflow.plugin import get_all_functions as get_plugin_functions from src.airflow.pool import get_all_functions as get_pool_functions from src.airflow.provider import get_all_functions as get_provider_functions from src.airflow.taskinstance import get_all_functions as get_taskinstance_functions from src.airflow.variable import get_all_functions as get_variable_functions from src.airflow.xcom import get_all_functions as get_xcom_functions from src.enums import APIType from src.envs import READ_ONLY APITYPE_TO_FUNCTIONS = { APIType.CONFIG: get_config_functions, APIType.CONNECTION: get_connection_functions,

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/yangkyeongmo/mcp-server-apache-airflow'

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