get_value
Retrieve specific configuration options from Apache Airflow using section and option parameters to simplify system setup and customization.
Instructions
Get a specific option from configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| option | Yes | ||
| section | Yes |
Implementation Reference
- src/airflow/config.py:31-35 (handler)The async handler function implementing the 'get_value' MCP tool. It calls the Airflow ConfigApi to retrieve a specific configuration value and returns it as text content.async def get_value( section: str, option: str ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = config_api.get_value(section=section, option=option) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/config.py:11-16 (registration)The get_all_functions() that registers the 'get_value' tool by including it in the list of tools with name, description, and read-only flag. This list is used by main.py to add the tools.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:95-97 (registration)The code in main.py that iterates over functions from get_all_functions() (including get_value) and registers each as an MCP tool using app.add_tool.for func, name, description, *_ in functions: app.add_tool(Tool.from_function(func, name=name, description=description))