set_dag_run_note
Add or update notes for specific Airflow DAG runs to document execution details, track changes, or provide context for workflow management.
Instructions
Update the DagRun note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | ||
| dag_run_id | Yes | ||
| note | Yes |
Implementation Reference
- src/airflow/dagrun.py:215-220 (handler)The asynchronous handler function that executes the set_dag_run_note tool logic by creating a SetDagRunNote model and calling the Airflow DAGRunApi.set_dag_run_note method.async def set_dag_run_note( dag_id: str, dag_run_id: str, note: str ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: set_dag_run_note = SetDagRunNote(note=note) response = dag_run_api.set_dag_run_note(dag_id=dag_id, dag_run_id=dag_run_id, set_dag_run_note=set_dag_run_note) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/dagrun.py:17-29 (registration)The get_all_functions() lists all tool functions including the registration tuple for set_dag_run_note: (set_dag_run_note, "set_dag_run_note", "Update the DagRun note", False).def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (post_dag_run, "post_dag_run", "Trigger a DAG by ID", False), (get_dag_runs, "get_dag_runs", "Get DAG runs by ID", True), (get_dag_runs_batch, "get_dag_runs_batch", "List DAG runs (batch)", True), (get_dag_run, "get_dag_run", "Get a DAG run by DAG ID and DAG run ID", True), (update_dag_run_state, "update_dag_run_state", "Update a DAG run state by DAG ID and DAG run ID", False), (delete_dag_run, "delete_dag_run", "Delete a DAG run by DAG ID and DAG run ID", False), (clear_dag_run, "clear_dag_run", "Clear a DAG run", False), (set_dag_run_note, "set_dag_run_note", "Update the DagRun note", False), (get_upstream_dataset_events, "get_upstream_dataset_events", "Get dataset events for a DAG run", True), ]