Skip to main content
Glama

status

Check the current state of undo operations, including checkpoint count, stack size, and undo availability, to manage file modifications effectively in the undo-mcp system.

Instructions

Get current status of the undo system (checkpoint count, number of checkpoints in the stack, and whether undo is possible)

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Handler logic for the 'status' tool within the CallToolRequestSchema handler. It retrieves the status from the ChangeTracker instance and returns a formatted text response.
    case "status": { const status = changeTracker.getStatus(); return { content: [ { type: "text", text: `📊 Undo System Status:\nCheckpoints: ${status.checkpointCount}\nCan Undo: ${status.canUndo}`, }, ], }; }
  • src/index.ts:69-76 (registration)
    Registration of the 'status' tool in the TOOLS array, used for ListToolsRequestSchema response. Includes name, description, and empty input schema.
    { name: "status", description: "Get current status of the undo system (checkpoint count, number of checkpoints in the stack, and whether undo is possible)", inputSchema: { type: "object", properties: {}, }, },
  • Input schema definition for the 'status' tool (empty object, no parameters required).
    inputSchema: { type: "object", properties: {}, },
  • Helper method 'getStatus()' in ChangeTracker class. Deduplicates checkpoints and returns the current checkpoint count and undo availability.
    getStatus(): { checkpointCount: number; canUndo: boolean; } { // Deduplicate checkpoints before returning status this.deduplicateCheckpoints(); return { checkpointCount: this.undoStack.length, canUndo: this.undoStack.length > 0, }; }

Other Tools

Related 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