Skip to main content
Glama

cleanup

Clear all undo checkpoints from the stack to free up memory and maintain system performance.

Instructions

Clear all undo checkpoints from the stack

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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");
    }
  • 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: {},
      },
    },
  • Input schema definition: accepts no parameters (empty object).
    inputSchema: {
      type: "object",
      properties: {},
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Clear') which implies a destructive operation, but doesn't specify whether this is irreversible, requires confirmation, affects system state, or has side effects. For a tool with zero annotation coverage and a potentially destructive function, this is a significant gap in transparency.

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?

The description is a single, direct sentence with zero waste—it states the exact action and target without fluff. It's appropriately sized and front-loaded, making it highly efficient for an agent to parse.

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

Completeness2/5

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

Given the tool's potential complexity (a destructive operation with no annotations and no output schema), the description is incomplete. It doesn't explain the outcome (e.g., what 'cleared' means, if confirmation is needed, or what happens post-operation), leaving the agent with insufficient context for safe and effective use.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't add parameter details, earning a baseline score of 4 for not introducing unnecessary information.

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

Purpose4/5

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

The description clearly states the action ('Clear') and the target resource ('all undo checkpoints from the stack'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_undos' or 'undo', which would require mentioning that this removes all checkpoints rather than listing or reverting them individually.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'undo' or 'checkpoint'. It lacks context about scenarios where clearing all checkpoints is appropriate, prerequisites, or warnings about irreversible effects, leaving the agent with minimal usage direction.

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/khalilbalaree/undo-mcp'

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