Skip to main content
Glama

MCP Server Airflow Token

get_event_logs

Retrieve and filter event log entries from Apache Airflow to monitor DAG runs, task executions, and workflow events with configurable parameters.

Instructions

List log entries from event log

Input Schema

NameRequiredDescriptionDefault
afterNo
beforeNo
dag_idNo
eventNo
excluded_eventsNo
included_eventsNo
limitNo
map_indexNo
offsetNo
order_byNo
ownerNo
run_idNo
task_idNo
try_numberNo

Input Schema (JSON Schema)

{ "properties": { "after": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "After" }, "before": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Before" }, "dag_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dag Id" }, "event": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Event" }, "excluded_events": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Excluded Events" }, "included_events": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Included Events" }, "limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Limit" }, "map_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Map Index" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Offset" }, "order_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Order By" }, "owner": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Owner" }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Run Id" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Task Id" }, "try_number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Try Number" } }, "type": "object" }

Implementation Reference

  • The async handler function that implements the 'get_event_logs' tool. It accepts various optional parameters for filtering event logs, constructs a kwargs dictionary, calls the Airflow EventLogApi.get_event_logs method, and returns the response as a list containing a TextContent object.
    async def get_event_logs( limit: Optional[int] = None, offset: Optional[int] = None, order_by: Optional[str] = None, dag_id: Optional[str] = None, task_id: Optional[str] = None, run_id: Optional[str] = None, map_index: Optional[int] = None, try_number: Optional[int] = None, event: Optional[str] = None, owner: Optional[str] = None, before: Optional[datetime] = None, after: Optional[datetime] = None, included_events: Optional[str] = None, excluded_events: 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 if dag_id is not None: kwargs["dag_id"] = dag_id if task_id is not None: kwargs["task_id"] = task_id if run_id is not None: kwargs["run_id"] = run_id if map_index is not None: kwargs["map_index"] = map_index if try_number is not None: kwargs["try_number"] = try_number if event is not None: kwargs["event"] = event if owner is not None: kwargs["owner"] = owner if before is not None: kwargs["before"] = before if after is not None: kwargs["after"] = after if included_events is not None: kwargs["included_events"] = included_events if excluded_events is not None: kwargs["excluded_events"] = excluded_events response = event_log_api.get_event_logs(**kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The registration function get_all_functions() that includes the get_event_logs tool in its list of tools to be registered, providing the function reference, name, description, and read-only flag.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_event_logs, "get_event_logs", "List log entries from event log", True), (get_event_log, "get_event_log", "Get a specific log entry by ID", 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/nikhil-ganage/mcp-server-airflow-token'

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