Skip to main content
Glama

checkpoint_restore

Restore a virtual filesystem workspace to a saved checkpoint to recover previous states or undo changes.

Instructions

Restore workspace to a checkpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • The handler function in CheckpointTools that executes the checkpoint restore logic by delegating to CheckpointManager and constructing the response.
    async def checkpoint_restore( self, request: CheckpointRestoreRequest ) -> CheckpointRestoreResponse: """ Restore workspace to a checkpoint. Args: request: CheckpointRestoreRequest with checkpoint_id Returns: CheckpointRestoreResponse with success status """ await self.checkpoint_manager.restore_checkpoint(request.checkpoint_id) return CheckpointRestoreResponse( success=True, checkpoint_id=request.checkpoint_id, restored_at=datetime.now(UTC), )
  • Registration of the 'checkpoint_restore' tool via @server.tool decorator, which wraps and delegates to the CheckpointTools handler.
    async def checkpoint_restore(request: CheckpointRestoreRequest): """Restore workspace to a checkpoint.""" return await checkpoint_tools_instance.checkpoint_restore(request)
  • Pydantic schema definitions for the input CheckpointRestoreRequest and output CheckpointRestoreResponse.
    class CheckpointRestoreRequest(BaseModel): """Request to restore checkpoint""" checkpoint_id: str class CheckpointRestoreResponse(BaseModel): """Response from checkpoint restore""" success: bool checkpoint_id: str restored_at: datetime
  • Core helper method in CheckpointManager that performs the actual restore by calling the underlying snapshot manager.
    async def restore_checkpoint(self, checkpoint_id: str) -> bool: """ Restore workspace to a checkpoint. Args: checkpoint_id: Checkpoint ID to restore Returns: True if restore was successful Raises: ValueError: If checkpoint doesn't exist """ snapshot_mgr = self._get_snapshot_manager() success = await snapshot_mgr.restore_snapshot(checkpoint_id) if not success: raise ValueError(f"Checkpoint '{checkpoint_id}' does not exist") return success

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/chrishayuk/chuk-mcp-vfs'

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