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))
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'List datasets' implies a read-only operation but doesn't specify pagination behavior, authentication requirements, rate limits, or what constitutes a 'dataset' in this context. The two-word description leaves critical behavioral aspects undocumented for a tool with 5 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just two words, which could be appropriate if it were more informative. However, given the tool's complexity (5 parameters, no annotations), this brevity represents under-specification rather than efficient communication. It's front-loaded but lacks substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 undocumented parameters, no annotations, no output schema, and multiple sibling tools, the two-word description is completely inadequate. It doesn't explain what a 'dataset' is in this system, how results are returned, what filtering options exist, or how this differs from other dataset-related tools. The description fails to provide necessary context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 5 parameters have descriptions in the schema. The tool description 'List datasets' provides no information about any parameters - not even hinting at filtering, pagination, or ordering capabilities. This fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List datasets' clearly states the verb ('List') and resource ('datasets'), providing a basic understanding of the tool's function. However, it lacks specificity about scope or filtering capabilities, and doesn't differentiate from sibling tools like 'get_dataset' (singular) or 'get_dataset_events'. The purpose is clear but minimal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_dataset' (singular), 'get_dataset_events', and 'get_dataset_queued_events', there's no indication of when this list operation is appropriate versus more specific dataset-related tools. No context or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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