windows_event_logs
Query, clear, export, or list Windows event logs (Application, System, Security) with filters for event ID and time range.
Instructions
Perform Windows Event Log operations with comprehensive error handling and agentic telemetry.
RATIONALE: Consolidates querying, clearing, and exporting logs into a single async portmanteau. Uses asyncio.to_thread for blocking pywin32 calls to maintain MCP responsiveness.
Args: action: The log operation to perform. log_name: Name of the event log (Application, System, Security, etc.). max_events: Maximum events to return (for "query"). time_range_hours: Lookback window (for "query"). event_id: Filter by specific Event ID. output_path: Destination for exported logs (for "export"). ctx: FastMCP Context for telemetry and sampling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| log_name | No | Application | |
| max_events | No | ||
| time_range_hours | No | ||
| event_id | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||