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;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, description carries full burden. It successfully explains domain semantics ('captures file state before AI made changes', 'shadow restore points') and provenance. However, lacks operational details like retention policies, pagination behavior, or performance characteristics expected for a zero-annotation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste. First states action, second explains entity semantics, third states intent/use-case. Front-loaded structure puts the operation first. Every sentence earns its place in conveying tool purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list tool without output schema, description adequately covers the conceptual model (what restore points are, their origin, their purpose). Minor gap: could explicitly mention that it returns a collection of IDs/objects, though 'find a restore point ID' implies this.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters present (baseline 4 per rubric). Description compensates by explaining implicit filtering scope ('all shadow restore points created by propose_commit'), clarifying that the listing is not global but filtered to AI-generated shadow points.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'List' with clear resource 'shadow restore points'. It explicitly links to sibling tool 'propose_commit' (creator) and implies connection to 'undo_change' workflow ('undoing a bad change'), clearly distinguishing this listing capability from other traversal/search siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'to find a restore point ID for undoing a bad change', providing clear workflow context (use after bad change, before undoing). However, lacks explicit 'when not to use' elements (e.g., if no commits exist) or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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