Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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")}` }] };
      }),
    );
  • Type definition for a restore point.
    export interface RestorePoint {
      id: string;
      timestamp: number;
      files: string[];
      message: string;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ForLoopCodes/contextplus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server