egui_inspection provides a wire protocol and an egui::Plugin (InspectionPlugin) that allows external tools to observe and drive an egui application. It is designed for tools like egui_mcp (an MCP server for AI agents) or planned visual debuggers and test inspection tools.
Supported capabilities include:
- AccessKit tree reading (
GetTree): Inspect the widget tree. - Input event injection (
HandleEvents): Simulate clicks, typing, and scrolling. - Screenshot capture (
Screenshot): Capture the current frame (requires the window to be visible/foregrounded). - Window resizing (
Resize): Change the application window size.
The protocol follows a strict request-response pattern, making it compatible with TCP sockets or unary RPC transports.