list_restore_points
View all saved file states to identify and select a restore point for undoing unwanted AI-generated code changes.
Instructions
List all shadow restore points created by propose_commit. Each point captures the file state before the AI made changes. Use this to find a restore point ID for undoing a bad change.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/git/shadow.ts:86-88 (handler)The handler function that retrieves the restore points from the manifest.
export async function listRestorePoints(rootDir: string): Promise<RestorePoint[]> { return loadManifest(rootDir); } - src/index.ts:332-346 (registration)Tool registration for list_restore_points in the MCP server.
server.tool( "list_restore_points", "List all shadow restore points created by propose_commit. Each point captures the file state before the AI made changes. " + "Use this to find a restore point ID for undoing a bad change.", {}, withRequestActivity(async () => { const points = await listRestorePoints(ROOT_DIR); if (points.length === 0) return { content: [{ type: "text" as const, text: "No restore points found." }] }; const lines = points.map((p) => `${p.id} | ${new Date(p.timestamp).toISOString()} | ${p.files.join(", ")} | ${p.message}`, ); return { content: [{ type: "text" as const, text: `Restore Points (${points.length}):\n\n${lines.join("\n")}` }] }; }), ); - src/git/shadow.ts:11-16 (schema)Type definition for a restore point.
export interface RestorePoint { id: string; timestamp: number; files: string[]; message: string; }