clear_debug_logs
Remove all collected debug logs to free up memory and prepare for new debugging sessions in the agentic-debugger MCP server.
Instructions
Clear all collected debug logs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:334-346 (handler)The handler for the 'clear_debug_logs' tool. Checks if a debug session is active and calls sessionManager.clearLogs() to clear the logs, returning a success message.case 'clear_debug_logs': { if (!sessionManager.isActive()) { return { content: [{ type: 'text', text: 'No active debug session.' }], isError: true, }; } sessionManager.clearLogs(); return { content: [{ type: 'text', text: 'Debug logs cleared.' }], }; }
- src/index.ts:116-123 (registration)Registers the 'clear_debug_logs' tool in the list of available tools, including its name, description, and empty input schema.{ name: 'clear_debug_logs', description: 'Clear all collected debug logs.', inputSchema: { type: 'object', properties: {}, }, },
- src/session.ts:115-121 (helper)The SessionManager.clearLogs() method, which implements the core logic by overwriting the debug log file with an empty string.clearLogs(): void { if (!this.session) { throw new Error('No active debug session'); } writeFileSync(this.session.logFile, ''); }