Skip to main content
Glama

get_dataset

Retrieve details for a specific dataset in Apache Airflow using the v1 API. Provide the dataset URI to access its information directly.

Instructions

[Tool Role]: Gets details of a specific dataset (v1 API only - v2 uses Assets).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_uriYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_dataset' tool, decorated with @mcp.tool() which registers it. Fetches specific dataset details via Airflow API v1 endpoint /datasets/{uri}, with v2 compatibility check.
    async def get_dataset(dataset_uri: str) -> Dict[str, Any]:
        """[Tool Role]: Gets details of a specific dataset (v1 API only - v2 uses Assets)."""
        from ..functions import get_api_version
        
        api_version = get_api_version()
        if api_version == "v2":
            return {
                "error": "Dataset API is not available in Airflow 3.x (API v2)", 
                "available_in": "v1 only",
                "v2_alternative": "Use Assets API for Airflow 3.x data-aware scheduling"
            }
        
        # URL encode the URI to handle special characters
        import urllib.parse
        encoded_uri = urllib.parse.quote(dataset_uri, safe='')
        
        resp = await airflow_request("GET", f"/datasets/{encoded_uri}")
        resp.raise_for_status()
        return resp.json()
  • Calls register_common_tools(mcp) which defines and registers the get_dataset tool among others for v1 API.
    common_tools.register_common_tools(mcp)
  • Calls register_common_tools(mcp) which defines and registers the get_dataset tool among others for v2 API (though tool returns error for v2).
    common_tools.register_common_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the API version constraint ('v1 API only'), which is useful context, but lacks details on permissions, rate limits, error handling, or what 'details' include. For a read operation with no annotation coverage, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded, with a clear purpose in the first clause and additional context in the second. Every sentence adds value, and there's no wasted verbiage or redundancy.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is somewhat complete. However, with no annotations and 0% schema coverage, it lacks behavioral and parameter details that would enhance agent understanding, making it adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It doesn't explain the 'dataset_uri' parameter beyond what the schema's title ('Dataset Uri') implies. No additional meaning, format, or examples are provided. With one parameter and no schema descriptions, the baseline is 3 as it minimally addresses the tool's purpose without parameter elaboration.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Gets details of a specific dataset' with a specific verb ('Gets') and resource ('dataset'). It distinguishes from siblings like 'list_datasets' by specifying retrieval of a single dataset. However, it doesn't fully differentiate from 'get_dataset_events' which also targets datasets, though for events rather than details.

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

Usage Guidelines3/5

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

The description provides implied usage guidance by noting 'v1 API only - v2 uses Assets,' suggesting this tool is for legacy API contexts. It doesn't explicitly state when to use this versus alternatives like 'list_datasets' or 'get_dataset_events,' nor does it provide exclusions or prerequisites for use.

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/call518/MCP-Airflow-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server