get_dataset
Retrieve datasets from Apache Airflow deployments using their URI, enabling access to stored data for analysis and workflow integration.
Instructions
Get a dataset by URI
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes |
Input Schema (JSON Schema)
{
"properties": {
"uri": {
"title": "Uri",
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
}
Implementation Reference
- src/airflow/dataset.py:66-70 (handler)The handler function that executes the 'get_dataset' tool logic: fetches the dataset by URI from Airflow DatasetApi and returns formatted text content.async def get_dataset( uri: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = dataset_api.get_dataset(uri=uri) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/dataset.py:15-15 (registration)Registers the get_dataset tool in the list of functions returned by get_all_functions(), providing name, description, and read-only flag for MCP server tool addition.(get_dataset, "get_dataset", "Get a dataset by URI", True),
- src/main.py:28-28 (registration)Maps APIType.DATASET to get_dataset_functions in the APITYPE_TO_FUNCTIONS dictionary, enabling dynamic retrieval and registration of dataset tools including get_dataset.APIType.DATASET: get_dataset_functions,
- src/main.py:10-10 (registration)Imports the get_all_functions from dataset.py, aliased for use in registering dataset tools like get_dataset.from src.airflow.dataset import get_all_functions as get_dataset_functions