get_plugins
Retrieve a list of loaded plugins from Apache Airflow deployments to monitor and manage available plugin functionality.
Instructions
Get a list of loaded plugins
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/plugin.py:18-41 (handler)The main handler function for the 'get_plugins' MCP tool. It accepts optional limit and offset parameters, calls the Airflow PluginApi to fetch plugins, and returns the response as TextContent.async def get_plugins( limit: Optional[int] = None, offset: Optional[int] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get a list of loaded plugins. 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 loaded plugins. """ # Build parameters dictionary kwargs: Dict[str, Any] = {} if limit is not None: kwargs["limit"] = limit if offset is not None: kwargs["offset"] = offset response = plugin_api.get_plugins(**kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/plugin.py:11-16 (registration)The get_all_functions() in this module provides the registration tuple for the 'get_plugins' tool, which is imported and used by main.py to add the tool to the MCP app.def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_plugins, "get_plugins", "Get a list of loaded plugins", True), ]
- src/airflow/plugin.py:18-21 (schema)Function signature defining the input schema (optional limit and offset integers) and output schema (list of content types).async def get_plugins( limit: Optional[int] = None, offset: Optional[int] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: