Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_log

Retrieve task execution logs from Apache Airflow by specifying DAG ID, task ID, run ID, and try number for monitoring and debugging workflows.

Instructions

Get the log from a task instance by DAG ID, task ID, DAG run ID and task try number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
task_idYes
dag_run_idYes
task_try_numberYes

Implementation Reference

  • The handler function implementing the 'get_log' tool logic, which retrieves task instance logs via the Airflow TaskInstanceApi and returns them as text content.
    async def get_log( dag_id: str, task_id: str, dag_run_id: str, task_try_number: int ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = task_instance_api.get_log( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, task_try_number=task_try_number, ) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The registration entry for the 'get_log' tool within the get_all_functions() list used for tool registration.
    get_log, "get_log", "Get the log from a task instance by DAG ID, task ID, DAG run ID and task try number", 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