get_health
Retrieve the current health and operational status of Apache Airflow instances via the MCP Server to ensure system monitoring and reliability.
Instructions
Get instance status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/airflow/monitoring.py:19-25 (handler)The main handler function for the 'get_health' tool. It asynchronously calls the Airflow MonitoringApi.get_health() and formats the response as MCP TextContent.async def get_health() -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get the status of Airflow's metadatabase, triggerer and scheduler. It includes info about metadatabase and last heartbeat of scheduler and triggerer. """ response = monitoring_api.get_health() return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/monitoring.py:11-16 (registration)Module-level function that provides the registration tuple for the 'get_health' tool, including the handler function, name, description, and read-only flag.def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_health, "get_health", "Get instance status", True), (get_version, "get_version", "Get version information", True), ]
- src/main.py:85-96 (registration)Server registration loop that calls get_all_functions() from modules like monitoring and adds each tool to the MCP app using app.add_tool, effectively registering 'get_health'.get_function = APITYPE_TO_FUNCTIONS[APIType(api)] try: functions = get_function() except NotImplementedError: continue # Filter functions for read-only mode if requested if read_only: functions = filter_functions_for_read_only(functions) for func, name, description, *_ in functions: app.add_tool(Tool.from_function(func, name=name, description=description))