Skip to main content
Glama

server_restore_backup

Restore Minecraft server backups using specific backup files to recover server data from previous states.

Instructions

Restore a specific backup for a Minecraft server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesServer ID or UUID
backup_idYesBackup ID
filenameYesBackup filename to restore
in_placeNoRestore in place (true) or to a new location

Implementation Reference

  • Registration and handler implementation for the server_restore_backup tool.
    server.tool(
      "server_restore_backup",
      "Restore a specific backup for a Minecraft server",
      {
        server_id: z.string().describe("Server ID or UUID"),
        backup_id: z.string().describe("Backup ID"),
        filename: z.string().min(5).describe("Backup filename to restore"),
        in_place: z.boolean().default(true).describe("Restore in place (true) or to a new location"),
      },
      async ({ server_id, backup_id, filename, in_place }) => {
        try {
          const data = await client.post(
            `/servers/${server_id}/backups/backup/${backup_id}/restore`,
            { filename, inPlace: in_place }
          );
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );

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/HadiCherkaoui/crafty-mcp'

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