clear_console_output
Clears the console output buffer to reset output collection before running a specific test or action.
Instructions
Clear the console output buffer. Use to reset output collection before running a specific test or action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/clear-console-output.ts:10-18 (handler)The clearConsoleOutput function that executes the tool logic. It calls consoleManager.clear() and returns { cleared: true }.
export function clearConsoleOutput( consoleManager: ConsoleManager ): ClearConsoleOutputOutput { consoleManager.clear(); return { cleared: true, }; } - The clearConsoleOutputTool object defining the MCP tool schema: name 'clear_console_output', description, and an empty inputSchema (no parameters required).
export const clearConsoleOutputTool = { name: 'clear_console_output', description: 'Clear the console output buffer. ' + 'Use to reset output collection before running a specific test or action.', inputSchema: { type: 'object', properties: {}, required: [], }, }; - The ClearConsoleOutputOutput interface defining the return type with a single 'cleared' boolean field.
export interface ClearConsoleOutputOutput { cleared: boolean; } - src/index.ts:165-176 (handler)The tool call handler in the MCP server that dispatches 'clear_console_output' requests to clearConsoleOutput(consoleManager) and returns the result as JSON text.
if (name === 'clear_console_output') { const result = clearConsoleOutput(consoleManager); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } - src/console-manager.ts:81-83 (helper)The ConsoleManager.clear() method that clears the output buffer by resetting it to an empty array.
clear(): void { this.buffer = []; }