get_version
Retrieve version details for Apache Airflow deployments through the MCP server with Bearer token authentication.
Instructions
Get version information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/airflow/monitoring.py:28-33 (handler)The async handler function that implements the 'get_version' tool. It retrieves version information from the Airflow MonitoringApi and returns it as formatted text content.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 that returns the registration tuple for 'get_version' (and 'get_health'). This function is imported in src/main.py and its output is used to register tools via app.add_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:78-92 (registration)The main tool registration loop in src/main.py that calls get_all_functions from monitoring (via APITYPE_TO_FUNCTIONS[APIType.MONITORING]) and registers each tool including 'get_version' using app.add_tool.for api in apis: logging.debug(f"Adding API: {api}") 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(func, name=name, description=description)