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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't specify whether this requires special permissions, if notes have length/format restrictions, whether updates are idempotent, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 4 words, with zero wasted language. It's front-loaded with the core action and target. While it may be too brief for adequate tool understanding, it earns full marks for conciseness as every word serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what DagRuns are, how notes are used, what happens after update, or provide any error handling context. The minimal description leaves too many gaps for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for all 3 parameters, the description provides no additional parameter information beyond what's in the schema. It doesn't explain what 'dag_id', 'dag_run_id', or 'note' represent, their formats, or constraints. The description fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update the DagRun note' clearly states the action (update) and target (DagRun note), providing a basic understanding of purpose. However, it lacks specificity about what a DagRun is or how notes are used, and doesn't differentiate from sibling tools like 'update_dag_run_state' or 'clear_dag_run' that also modify DagRuns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'update_dag_run_state' and 'clear_dag_run' that also operate on DagRuns, there's no indication of when note updates are appropriate versus state changes or clearing operations. No prerequisites or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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