Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_config

Retrieve Apache Airflow configuration settings to manage workflows and system parameters through the MCP server interface.

Instructions

Get current configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionNo

Implementation Reference

  • The main handler function for the 'get_config' tool. It optionally takes a 'section' parameter, fetches the Airflow configuration via ConfigApi, and formats 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()))]
  • The get_all_functions utility that provides the registration tuple for the 'get_config' tool, including its name, description, and read-only status.
    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:25-25 (registration)
    Maps APIType.CONFIG to the get_config_functions (alias for get_all_functions from config.py), enabling registration of config tools including 'get_config'.
    APIType.CONFIG: get_config_functions,
  • src/main.py:95-96 (registration)
    The code block that iterates over the functions from get_all_functions (for CONFIG) 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))

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yangkyeongmo/mcp-server-apache-airflow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server