Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

delete_dag

Remove a Directed Acyclic Graph (DAG) from Apache Airflow deployments to manage workflow definitions and maintain system organization.

Instructions

Delete a DAG

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes

Implementation Reference

  • The primary handler function implementing the 'delete_dag' tool. It calls the Airflow DAG API to delete the DAG specified by dag_id and returns the API response as MCP TextContent.
    async def delete_dag(dag_id: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        response = dag_api.delete_dag(dag_id=dag_id)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Module-level registration function that includes the 'delete_dag' tool in the list of DAG-related functions, which are later imported and registered in main.py via app.add_tool.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (get_dags, "fetch_dags", "Fetch all DAGs", True),
            (get_dag, "get_dag", "Get a DAG by ID", True),
            (get_dag_details, "get_dag_details", "Get a simplified representation of DAG", True),
            (get_dag_source, "get_dag_source", "Get a source code", True),
            (pause_dag, "pause_dag", "Pause a DAG by ID", False),
            (unpause_dag, "unpause_dag", "Unpause a DAG by ID", False),
            (get_dag_tasks, "get_dag_tasks", "Get tasks for DAG", True),
            (get_task, "get_task", "Get a task by ID", True),
            (get_tasks, "get_tasks", "Get tasks for DAG", True),
            (patch_dag, "patch_dag", "Update a DAG", False),
            (patch_dags, "patch_dags", "Update multiple DAGs", False),
            (delete_dag, "delete_dag", "Delete a DAG", False),
            (clear_task_instances, "clear_task_instances", "Clear a set of task instances", False),
            (set_task_instances_state, "set_task_instances_state", "Set a state of task instances", False),
            (reparse_dag_file, "reparse_dag_file", "Request re-parsing of a DAG file", False),
        ]
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Delete a DAG' implies a destructive mutation, but it doesn't disclose critical behaviors like whether deletion is permanent, requires specific permissions, affects related resources (e.g., runs or tasks), or has side effects. This is a significant gap for a destructive tool.

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 with just three words, front-loading the essential action and resource. There's no wasted language, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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?

Given the tool's destructive nature, no annotations, no output schema, and 0% schema coverage, the description is incomplete. It fails to address key aspects like behavioral risks, parameter details, or usage context, leaving the agent with insufficient information to invoke it safely and correctly.

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

Parameters3/5

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

Schema description coverage is 0%, with one parameter 'dag_id' undocumented in the schema. The description adds no parameter information beyond what's inferred from the tool name. Since there's only one parameter, the baseline is 4, but the description doesn't compensate for the lack of schema details, such as explaining what 'dag_id' represents or its format.

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

Purpose4/5

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

The description 'Delete a DAG' clearly states the action (delete) and resource (DAG), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'delete_dag_run' or 'delete_dataset_queued_events', which also delete related resources, so it lacks sibling distinction.

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 siblings like 'delete_dag_run' (deletes specific runs) and 'clear_dag_run' (clears runs), there's no indication of when this tool is appropriate, such as for deleting the entire DAG definition versus its instances.

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