get_config
Retrieve current Apache Airflow configuration settings to access deployment parameters and system information for workflow management.
Instructions
Get current configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| section | No |
Input Schema (JSON Schema)
{
"properties": {
"section": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Section"
}
},
"type": "object"
}
Implementation Reference
- src/airflow/config.py:19-29 (handler)The main handler function that implements the 'get_config' tool. It accepts an optional 'section' parameter, calls the Airflow ConfigApi.get_config(), and returns the response as MCP TextContent.async def get_config( section: Optional[str] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: # Build parameters dictionary kwargs: Dict[str, Any] = {} if section is not None: kwargs["section"] = section response = config_api.get_config(**kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/config.py:11-16 (registration)The get_all_functions helper that provides the registration details (function, name, description, read_only) for the get_config tool, used by main.py.def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_config, "get_config", "Get current configuration", True), (get_value, "get_value", "Get a specific option from configuration", True), ]
- src/main.py:23-23 (registration)Mapping APIType.CONFIG to get_config_functions (alias for get_all_functions from config.py) in the APITYPE_TO_FUNCTIONS dictionary used for tool registration.APIType.CONFIG: get_config_functions,
- src/main.py:90-92 (registration)The app.add_tool call that registers the get_config tool (along with others) by iterating over the functions list.for func, name, description, *_ in functions: app.add_tool(func, name=name, description=description)