Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_providers

Retrieve a list of loaded providers from Apache Airflow to manage and monitor system integrations.

Instructions

Get a list of loaded providers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The async handler function implementing the 'get_providers' tool logic, which fetches providers from the Airflow API using limit and offset parameters and returns formatted text content.
    async def get_providers(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Get a list of providers.
    
        Args:
            limit: The numbers of items to return.
            offset: The number of items to skip before starting to collect the result set.
    
        Returns:
            A list of providers with their details.
        """
        # Build parameters dictionary
        kwargs: Dict[str, Any] = {}
        if limit is not None:
            kwargs["limit"] = limit
        if offset is not None:
            kwargs["offset"] = offset
    
        response = provider_api.get_providers(**kwargs)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Local registration of the 'get_providers' tool via the get_all_functions() which returns the tool tuple used by the main server.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (get_providers, "get_providers", "Get a list of loaded providers", True),
        ]
  • src/main.py:95-96 (registration)
    Global registration loop in main.py where tools from all modules, including get_providers, are added to the MCP app using Tool.from_function.
    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