cleanup
Remove all undo checkpoints from the stack to free resources and reset the undo history in the MCP server’s checkpoint-based system for Claude Code editing.
Instructions
Clear all undo checkpoints from the stack
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/changeTracker.ts:190-193 (handler)The `cleanup()` method of the ChangeTracker class, which executes the core tool logic by clearing the entire undoStack array of all checkpoints.cleanup(): void { this.undoStack = []; console.error("[DEBUG] All checkpoints cleared"); }
- src/index.ts:61-68 (registration)Registration of the "cleanup" tool in the TOOLS array, which provides the tool name, description, and input schema for the ListToolsRequestHandler.{ name: "cleanup", description: "Clear all undo checkpoints from the stack", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:131-141 (handler)The switch case handler in the CallToolRequestSchema request handler that invokes changeTracker.cleanup() and returns the success response.case "cleanup": { changeTracker.cleanup(); return { content: [ { type: "text", text: "✅ All undo checkpoints cleared", }, ], }; }