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

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)

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