get_providers
Retrieve a list of loaded Airflow providers from an MCP server to manage and monitor available data processing components.
Instructions
Get a list of loaded providers
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
},
"offset": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Offset"
}
},
"type": "object"
}
Implementation Reference
- src/airflow/provider.py:18-41 (handler)The core handler function implementing the 'get_providers' tool. It accepts optional limit and offset parameters, calls the Airflow ProviderApi.get_providers(), and returns the response as TextContent.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()))]
- src/airflow/provider.py:11-15 (registration)Module-level registration of the 'get_providers' tool via get_all_functions(), which returns the tool tuple (function, name, description, read-only flag) for use by the main MCP 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:16-16 (registration)Imports the provider module's get_all_functions to enable registration of 'get_providers' tool in the main MCP application.from src.airflow.provider import get_all_functions as get_provider_functions
- src/main.py:34-34 (registration)Maps the PROVIDER API type to its get_all_functions, enabling the 'get_providers' tool to be loaded during server initialization.APIType.PROVIDER: get_provider_functions,