get_version
Retrieve version details of the Apache Airflow instance via the MCP Server, enabling users to monitor system compatibility and ensure proper integration with their workflows.
Instructions
Get version information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/airflow/monitoring.py:28-33 (handler)The handler function that implements the 'get_version' tool. It invokes the Airflow MonitoringApi to fetch version information and returns it formatted as MCP TextContent.async def get_version() -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get version information about Airflow. """ response = monitoring_api.get_version() return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/monitoring.py:11-16 (registration)The get_all_functions() in monitoring.py defines and returns the registration tuple for the 'get_version' tool, which is later used in src/main.py to add the tool.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:95-97 (registration)Generic registration loop in main.py that adds all tools, including 'get_version', by calling get_all_functions() from monitoring.py (imported as get_monitoring_functions).for func, name, description, *_ in functions: app.add_tool(Tool.from_function(func, name=name, description=description))