Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_xcom_entry

Retrieve specific XCom data from Apache Airflow using parameters like DAG ID, task ID, and XCom key, enabling precise extraction of cross-communication data between tasks.

Instructions

Get an XCom entry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes
deserializeNo
map_indexNo
stringifyNo
task_idYes
xcom_keyYes

Implementation Reference

  • The handler function that executes the "get_xcom_entry" tool. It constructs parameters and calls the Airflow XComApi to fetch the specific XCom entry, returning it as a text content response.
    async def get_xcom_entry( dag_id: str, dag_run_id: str, task_id: str, xcom_key: str, map_index: Optional[int] = None, deserialize: Optional[bool] = None, stringify: Optional[bool] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: # Build parameters dictionary kwargs: Dict[str, Any] = {} if map_index is not None: kwargs["map_index"] = map_index if deserialize is not None: kwargs["deserialize"] = deserialize if stringify is not None: kwargs["stringify"] = stringify response = xcom_api.get_xcom_entry( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, xcom_key=xcom_key, **kwargs ) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The module registration function listing available tools, including "get_xcom_entry". This is imported and called in src/main.py to register the tool with the MCP server.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_xcom_entries, "get_xcom_entries", "Get all XCom entries", True), (get_xcom_entry, "get_xcom_entry", "Get an XCom entry", True), ]

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