Skip to main content
Glama
MCP-Airflow-API

MCP-Airflow-API

by call518

get_task_instance_logs

Retrieve logs for a specific Airflow task instance using DAG ID, run ID, task ID, and optional try number to diagnose failures and monitor execution.

Instructions

[Tool Role]: Retrieves logs for a specific task instance.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dag_id": "<dag_id>",
      "dag_run_id": "<dag_run_id>",
      "task_id": "<task_id>"
    },
    "name": "get_task_instance_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
dag_idYesExact DAG identifier, as returned by list_dags; not its display name.
task_idYesExact task identifier within the selected DAG.
dag_run_idYesExact DAG run identifier for the selected DAG.
try_numberNoTask attempt number whose logs to retrieve (default: 1). Default: 1.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.7.4
    • addedInput schema / properties / dag_id / description
      Added value: +"Exact DAG identifier, as returned by list_dags; not its\ndisplay name."
    • addedInput schema / properties / dag_run_id / description
      Added value: +"Exact DAG run identifier for the selected DAG."
    • addedInput schema / properties / task_id / description
      Added value: +"Exact task identifier within the selected DAG."
    • addedInput schema / properties / try_number / description
      Added value: +"Task attempt number whose logs to retrieve (default:\n1). Default: 1."
  2. Addedv3.7.2
  3. Removedv3.6.5
  4. Changed5 schema fields changedv3.6.6
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / dag_id / title
      Removed value: -"Dag Id"
    • removedInput schema / properties / dag_run_id / title
      Removed value: -"Dag Run Id"
    • removedInput schema / properties / task_id / title
      Removed value: -"Task Id"
    • removedInput schema / properties / try_number / title
      Removed value: -"Try Number"
  5. Changed2 schema fields changedv1.0.0
    • removedInput schema / properties / full_content
      Removed value: -{
      -  "default": false,
      -  "title": "Full Content",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / token
      Removed value: -{
      -  "default": null,
      -  "title": "Token",
      -  "type": "string"
      -}
  6. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not disclose whether logs exist only for started/finished attempts, how try_number maps to retries, whether output is paginated or truncated, or any permission requirements — all relevant for a log-retrieval tool.

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

Conciseness4/5

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

A single front-loaded sentence with no filler. The '[Tool Role]:' prefix is slightly stylized but the substance is efficient and immediately conveys the action and target.

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

Completeness3/5

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

An output schema exists and the input schema is fully documented, so return values and parameters need not be explained. Still, for a log tool with no annotations, the description leaves behavioral questions (retry semantics, log availability) unanswered, making it only minimally adequate.

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 100%, so all four parameters including try_number's default are already documented in the schema. The description adds no extra semantics beyond 'specific task instance', so the baseline 3 applies.

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?

States a specific verb ('Retrieves') and resource ('logs for a specific task instance'), which distinguishes it from siblings like get_task_instance_details and get_task_instance_extra_links. However, it does not explicitly name a sibling or state the boundary between logs and details.

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 gives no indication of when to use this tool versus get_task_instance_details or get_task_instance_extra_links, nor any prerequisite such as the task instance needing to have run. Usage must be inferred entirely from the tool name.

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