get_health
Check the operational status and health of an Apache Airflow instance to monitor deployment availability and performance.
Instructions
Get instance status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/airflow/monitoring.py:19-25 (handler)The async handler function implementing the 'get_health' MCP tool. It retrieves the Airflow instance health status via the monitoring API and formats it 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:13-16 (registration)The registration tuple for the 'get_health' tool within get_all_functions(), which provides the handler, name, description, and read-only flag to the main registration logic in src/main.py.return [ (get_health, "get_health", "Get instance status", True), (get_version, "get_version", "Get version information", True), ]
- src/main.py:90-91 (registration)Generic tool registration loop in main.py where the 'get_health' tool (imported indirectly via get_monitoring_functions) is added to the MCP app using app.add_tool.for func, name, description, *_ in functions: app.add_tool(func, name=name, description=description)