Skip to main content
Glama

list_xcom_entries

Retrieve cross-communication data between Airflow tasks to monitor task outputs and dependencies for specific DAG runs.

Instructions

[Tool Role]: Lists XCom entries for a specific task instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes
task_idYes
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function implementing the 'list_xcom_entries' tool. It queries the Airflow REST API to retrieve XCom entries for a given DAG run and task instance with pagination support.
    @mcp.tool()
    async def list_xcom_entries(dag_id: str, dag_run_id: str, task_id: str, limit: int = 20, offset: int = 0) -> Dict[str, Any]:
        """[Tool Role]: Lists XCom entries for a specific task instance."""
        params = {'limit': limit, 'offset': offset}
        query_string = "&".join([f"{k}={v}" for k, v in params.items()])
        resp = await airflow_request("GET", f"/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries?{query_string}")
        resp.raise_for_status()
        return resp.json()
  • Registration function for Airflow API v1 that sets the v1-specific airflow_request and calls register_common_tools(mcp), which defines and registers the list_xcom_entries tool among others.
    def register_tools(mcp):
        """Register v1 tools by importing common tools with v1 request function."""
        
        logger.info("Initializing MCP server for Airflow API v1")
        logger.info("Loading Airflow API v1 tools (Airflow 2.x)")
        
        # Set the global request function to v1
        common_tools.airflow_request = airflow_request_v1
        
        # Register all 56 common tools (includes management tools)
        common_tools.register_common_tools(mcp)
        
        # V1 has no exclusive tools - all tools are shared with v2
        
        logger.info("Registered all Airflow API v1 tools (56 tools: 43 core + 13 management tools)")
  • Registration function for Airflow API v2 that sets the v2-specific airflow_request and calls register_common_tools(mcp), which defines and registers the list_xcom_entries tool among others.
    def register_tools(mcp):
        """Register v2 tools: common tools + v2-exclusive asset tools."""
        
        logger.info("Initializing MCP server for Airflow API v2")
        logger.info("Loading Airflow API v2 tools (Airflow 3.0+)")
        
        # Set the global request function to v2
        common_tools.airflow_request = airflow_request_v2
        
        # Register all 43 common tools
        common_tools.register_common_tools(mcp)
  • Top-level registration call for v1 tools in mcp_main.py, which indirectly registers the list_xcom_entries tool via v1_tools.register_tools.
    if api_version == "v1":
        logger.info("Loading Airflow API v1 tools (Airflow 2.x)")
        from mcp_airflow_api.tools import v1_tools
        v1_tools.register_tools(mcp_instance)
    elif api_version == "v2":
  • Top-level registration call for v2 tools in mcp_main.py, which indirectly registers the list_xcom_entries tool via v2_tools.register_tools.
    elif api_version == "v2":
        logger.info("Loading Airflow API v2 tools (Airflow 3.0+)")
        from mcp_airflow_api.tools import v2_tools
        v2_tools.register_tools(mcp_instance)
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. It only states the basic function without mentioning pagination behavior (implied by limit/offset parameters), read-only nature, authentication requirements, rate limits, or what happens when parameters are invalid. For a tool with 5 parameters and no annotation coverage, this is insufficient behavioral context.

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 a single sentence that efficiently communicates the core function. It uses the '[Tool Role]' prefix effectively to establish context immediately. There's zero wasted language or redundancy in this minimal but complete statement of purpose.

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?

Given that an output schema exists (which covers return values), the description's minimal approach is somewhat acceptable. However, for a tool with 5 parameters (3 required) and no annotations, the description should provide more context about parameter relationships and usage scenarios. The presence of an output schema reduces but doesn't eliminate the need for better behavioral and parameter guidance.

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 but adds no parameter information. It doesn't explain what 'dag_id', 'dag_run_id', or 'task_id' represent, nor does it clarify the relationship between these identifiers. The description mentions 'specific task instance' which hints at the required parameters but provides no concrete guidance on format, constraints, or how to obtain these values.

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 ('Lists') and resource ('XCom entries') with specific scope ('for a specific task instance'). It distinguishes from the sibling tool 'get_xcom_entry' which retrieves a single entry rather than listing multiple entries. However, it doesn't explicitly differentiate from other list tools like 'list_task_instances_all' or 'list_task_instances_batch'.

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. It doesn't mention when to use 'list_xcom_entries' versus 'get_xcom_entry' (single entry retrieval) or other listing tools. There's no context about prerequisites, dependencies, or typical use cases for accessing XCom entries.

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/call518/MCP-Airflow-API'

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