Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

set_dag_run_note

Add or update notes to Airflow DAG runs for tracking execution details, debugging, and team collaboration.

Instructions

Update the DagRun note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes
noteYes

Implementation Reference

  • The async handler function that implements the core logic of the set_dag_run_note tool by creating a SetDagRunNote model and calling the Airflow DAGRunApi to update the DAG run note.
    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()))]
  • The registration point where the set_dag_run_note tool is listed in the get_all_functions() return value for MCP tool registration, specifying the handler function, name, description, and read-only status.
    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),
        ]
  • Import of the SetDagRunNote model class, which defines the input schema (note field) for the set_dag_run_note tool.
    from airflow_client.client.model.set_dag_run_note import SetDagRunNote

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/nikhil-ganage/mcp-server-airflow-token'

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