Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

list_task_instance_tries

Retrieve execution attempts for a specific Airflow task instance to monitor performance and debug failures. Use DAG ID, DAG run ID, and task ID to query task execution history.

Instructions

List task instance tries by DAG ID, DAG run ID, and task ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes
task_idYes
limitNo
offsetNo
order_byNo

Implementation Reference

  • The async handler function for the 'list_task_instance_tries' tool. It accepts dag_id, dag_run_id, task_id, optional limit, offset, order_by; calls the Airflow TaskInstanceApi.get_task_instance_tries and returns the response as TextContent.
    async def list_task_instance_tries(
        dag_id: str,
        dag_run_id: str,
        task_id: str,
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        order_by: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        # Build parameters dictionary
        kwargs: Dict[str, Any] = {}
        if limit is not None:
            kwargs["limit"] = limit
        if offset is not None:
            kwargs["offset"] = offset
        if order_by is not None:
            kwargs["order_by"] = order_by
    
        response = task_instance_api.get_task_instance_tries(
            dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, **kwargs
        )
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registration tuple for the 'list_task_instance_tries' tool in the get_all_functions() list, including the handler function, name, description, and read-only flag.
    (
        list_task_instance_tries,
        "list_task_instance_tries",
        "List task instance tries by DAG ID, DAG run ID, and task ID",
        True,
    ),
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. It implies a read-only list operation but doesn't disclose behavioral traits like pagination (handled by limit/offset), ordering (order_by), error conditions, or output format. For a tool with 6 parameters and no output schema, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and key identifiers, making it easy to parse. Every word contributes directly to the tool's 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?

Given the complexity (6 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, pagination behavior, or how parameters interact. For a list operation with filtering and sorting options, more context is needed to use it effectively.

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?

Schema description coverage is 0%, so the description must compensate. It mentions three required parameters (dag_id, dag_run_id, task_id) but omits the optional ones (limit, offset, order_by) and provides no semantic context for any parameters. This leaves most parameters undocumented and their purposes unclear.

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 clearly states the verb ('List') and resource ('task instance tries'), specifying the key identifiers (DAG ID, DAG run ID, task ID) needed. It distinguishes from siblings like 'list_task_instances' by focusing on 'tries', but doesn't explicitly contrast them. The purpose is specific and actionable.

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?

No guidance is provided on when to use this tool versus alternatives like 'list_task_instances' or 'get_task_instance'. The description only states what it does, not when it's appropriate or what prerequisites exist. This leaves the agent to infer usage from context.

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/yangkyeongmo/mcp-server-apache-airflow'

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