create_dataset_event
Generate dataset events in Apache Airflow to trigger DAGs based on data availability, enabling automated workflow execution when datasets are ready.
Instructions
Create dataset event
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset_uri": "<dataset_uri>"
},
"name": "create_dataset_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_uri | Yes | ||
| extra | No |
Implementation Reference
- src/airflow/dataset.py:106-117 (handler)The async handler function implementing the create_dataset_event tool. It constructs an event request from dataset_uri and optional extra, calls the Airflow DatasetApi to create the event, and returns the response as text content.
async def create_dataset_event( dataset_uri: str, extra: Optional[Dict[str, Any]] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: event_request = { "dataset_uri": dataset_uri, } if extra is not None: event_request["extra"] = extra response = dataset_api.create_dataset_event(create_dataset_event=event_request) return [types.TextContent(type="text", text=str(response.to_dict()))] - src/airflow/dataset.py:17-17 (registration)The registration tuple in get_all_functions() that specifies the create_dataset_event function, its name, description, and that it is not read-only. This list is imported and used in src/main.py to register the tool with the MCP server.
(create_dataset_event, "create_dataset_event", "Create dataset event", False),