Skip to main content
Glama
astronomer

astro-airflow-mcp

Official
by astronomer

diagnose_dag_run

Troubleshoot failed or problematic Airflow DAG runs by retrieving run metadata, task instance states, and highlighting failed tasks for quick diagnosis.

Instructions

Diagnose issues with a specific DAG run - get run details and failed tasks.

USE THIS TOOL WHEN troubleshooting a failed or problematic DAG run. Returns all the information you need to understand what went wrong.

This is the preferred tool when:

  • User asks "Why did this DAG run fail?"

  • User asks "What's wrong with run X?"

  • You need to investigate task failures in a specific run

Returns combined data:

  • DAG run metadata (state, start/end times, trigger type)

  • All task instances for this run with their states

  • Highlighted failed/upstream_failed tasks with details

  • Summary of task states

Args: dag_id: The ID of the DAG dag_run_id: The ID of the DAG run (e.g., "manual__2024-01-01T00:00:00+00:00")

Returns: JSON with diagnostic information about the DAG run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses the tool returns combined data (metadata, tasks, failures) and is read-only in nature. With no annotations, a clear behavioral description is provided, though it could explicitly state no side effects.

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?

Well-structured with clear sections, bullet points, and front-loaded purpose. Every sentence adds value without redundancy.

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

Completeness5/5

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

Covers all necessary aspects: purpose, usage, parameters, and return values (described). With an output schema present, the description provides sufficient context for an AI agent to use the tool correctly.

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

Parameters4/5

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

Despite 0% schema coverage, the description explains both parameters ('dag_id', 'dag_run_id') with example values and context, compensating well for the missing schema descriptions.

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

Purpose5/5

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

Clearly states the tool diagnoses issues with a specific DAG run, providing run details and failed tasks. Differentiates from sibling tools like 'get_dag_run' by emphasizing combined data and failure highlights.

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

Usage Guidelines5/5

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

Explicitly states when to use (troubleshooting failed runs) and provides example user queries. Implicitly indicates alternatives by describing its specialized diagnostic function.

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/astronomer/astro-airflow-mcp'

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