list_config_sections
Retrieve all configuration sections with summaries to monitor and manage Apache Airflow clusters without API complexity.
Instructions
[Tool Role]: Lists all configuration sections with summary.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function for the 'list_config_sections' tool. It fetches the Airflow configuration via the API, summarizes the sections with option counts and sample option names, and handles access errors.async def list_config_sections() -> Dict[str, Any]: """[Tool Role]: Lists all configuration sections with summary.""" try: resp = await airflow_request("GET", "/config") resp.raise_for_status() config_data = resp.json() sections_summary = {} for section_name, section_data in config_data.get("sections", {}).items(): options_count = len(section_data.get("options", {})) sections_summary[section_name] = { "options_count": options_count, "sample_options": list(section_data.get("options", {}).keys())[:5] } return { "sections_summary": sections_summary, "total_sections": len(sections_summary) } except Exception as e: return { "error": f"Configuration access denied: {str(e)}", "note": "This requires 'expose_config = True' in airflow.cfg [webserver] section" }
- src/mcp_airflow_api/tools/v1_tools.py:23-23 (registration)Calls register_common_tools(mcp) which registers the list_config_sections tool (among others) for Airflow API v1.common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:24-24 (registration)Calls register_common_tools(mcp) which registers the list_config_sections tool (among others) for Airflow API v2.common_tools.register_common_tools(mcp)