Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_datasets

Retrieve and filter datasets from Apache Airflow with pagination and sorting options to manage data dependencies in workflows.

Instructions

List datasets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
order_byNo
uri_patternNo
dag_idsNo

Implementation Reference

  • The async handler function implementing the 'get_datasets' tool. It constructs query parameters and calls the Airflow DatasetApi to list datasets, returning the result as MCP TextContent.
    async def get_datasets( limit: Optional[int] = None, offset: Optional[int] = None, order_by: Optional[str] = None, uri_pattern: Optional[str] = None, dag_ids: Optional[str] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: # Build parameters dictionary kwargs: Dict[str, Any] = {} if limit is not None: kwargs["limit"] = limit if offset is not None: kwargs["offset"] = offset if order_by is not None: kwargs["order_by"] = order_by if uri_pattern is not None: kwargs["uri_pattern"] = uri_pattern if dag_ids is not None: kwargs["dag_ids"] = dag_ids response = dataset_api.get_datasets(**kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The registration entry for the 'get_datasets' tool within the get_all_functions() list, specifying the function, name, description, and read-only status.
    (get_datasets, "get_datasets", "List datasets", True),
  • src/main.py:95-96 (registration)
    The registration loop in main.py that adds the 'get_datasets' tool (along with others) to the MCP server application using fastmcp's 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