tauri_ipc_get_captured
Retrieve captured IPC traffic from Tauri applications to monitor invoke calls and events with arguments and responses. Requires ipc_monitor to be active.
Instructions
[Tauri Apps Only] Get captured Tauri IPC traffic (requires ipc_monitor started). Shows captured commands (invoke calls) and events with arguments and responses. For browser network requests, use Chrome DevTools MCP instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter events by command name | |
| appIdentifier | No | App port or bundle ID to target. Defaults to the only connected app or the default app if multiple are connected. |
Implementation Reference
- The handler function `getIPCEvents` that implements the core logic: invokes the Tauri plugin command to retrieve captured IPC events, applies optional filtering, and returns formatted JSON.export async function getIPCEvents(filter?: string, appIdentifier?: string | number): Promise<string> { try { const result = await executeIPCCommand({ command: 'plugin:mcp-bridge|get_ipc_events', appIdentifier }); const parsed = JSON.parse(result); if (!parsed.success) { throw new Error(parsed.error || 'Unknown error'); } let events = parsed.result; if (filter && Array.isArray(events)) { events = events.filter((e: unknown) => { const event = e as { command?: string }; return event.command && event.command.includes(filter); }); } return JSON.stringify(events); } catch(error: unknown) { const message = error instanceof Error ? error.message : String(error); throw new Error(`Failed to get IPC events: ${message}`); } }
- Zod schema `GetIPCEventsSchema` defining input validation for the tool: optional `filter` string and `appIdentifier`.export const GetIPCEventsSchema = z.object({ filter: z.string().optional().describe('Filter events by command name'), appIdentifier: z.union([ z.string(), z.number() ]).optional().describe( 'App port or bundle ID to target. Defaults to the only connected app or the default app if multiple are connected.' ), });
- packages/mcp-server/src/tools-registry.ts:526-544 (registration)Tool registration in the central `TOOLS` registry array, linking name, description, schema, annotations, and handler.{ name: 'tauri_ipc_get_captured', description: '[Tauri Apps Only] Get captured Tauri IPC traffic (requires ipc_monitor started). ' + 'Shows captured commands (invoke calls) and events with arguments and responses. ' + 'For browser network requests, use Chrome DevTools MCP instead.', category: TOOL_CATEGORIES.IPC_PLUGIN, schema: GetIPCEventsSchema, annotations: { title: 'Get Captured IPC Traffic', readOnlyHint: true, openWorldHint: false, }, handler: async (args) => { const parsed = GetIPCEventsSchema.parse(args); return await getIPCEvents(parsed.filter, parsed.appIdentifier); }, },