cleanup
Clear all undo checkpoints from the stack to free up memory and maintain system performance.
Instructions
Clear all undo checkpoints from the stack
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cleanup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/changeTracker.ts:190-193 (handler)Core handler logic for the cleanup tool: clears the entire undo stack by setting it to an empty array.
cleanup(): void { this.undoStack = []; console.error("[DEBUG] All checkpoints cleared"); } - src/index.ts:131-141 (handler)MCP tool dispatch handler: calls changeTracker.cleanup() and returns success message.
case "cleanup": { changeTracker.cleanup(); return { content: [ { type: "text", text: "✅ All undo checkpoints cleared", }, ], }; } - src/index.ts:61-68 (registration)Tool registration in TOOLS array, including name, description, and empty input schema.
{ name: "cleanup", description: "Clear all undo checkpoints from the stack", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:64-67 (schema)Input schema definition: accepts no parameters (empty object).
inputSchema: { type: "object", properties: {}, },