Skip to main content
Glama

list_backups

View available Minecraft world backups to restore previous game states. Filter results by world name to locate specific backup files for server recovery.

Instructions

List all available world backups, optionally filtered by world name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
world_nameNoFilter by world name (optional)

Implementation Reference

  • The implementation of `listBackups` in `BackupManager` which lists files in the backup directory and parses their information.
    /** List all backups */
    listBackups(worldName?: string): BackupInfo[] {
      this.ensureBackupDir();
    
      const files = fs.readdirSync(this.backupDir);
      const backups: BackupInfo[] = [];
    
      for (const file of files) {
        if (!file.endsWith(".tar.gz")) continue;
    
        const fullPath = path.join(this.backupDir, file);
        const stats = fs.statSync(fullPath);
        const baseName = file.replace(".tar.gz", "");
    
        // Parse world name from backup name (worldName_YYYY-MM-DD_HH-MM-SS)
        const underscoreIdx = baseName.indexOf("_");
        const parsedWorldName =
          underscoreIdx > 0 ? baseName.substring(0, underscoreIdx) : baseName;
    
        if (worldName && parsedWorldName !== worldName) continue;
    
        backups.push({
          name: baseName,
          worldName: parsedWorldName,
          timestamp: stats.mtime,
          sizeMB: Math.round((stats.size / (1024 * 1024)) * 100) / 100,
          path: fullPath,
        });
      }
    
      return backups.sort(
        (a, b) => b.timestamp.getTime() - a.timestamp.getTime()
      );
    }
  • Registration of the 'list_backups' tool using the McpServer and calling `backupManager.listBackups`.
    // --- List Backups ---
    server.tool(
      "list_backups",
      "List all available world backups, optionally filtered by world name.",
      {
        world_name: z
          .string()
          .optional()
          .describe("Filter by world name (optional)"),
      },
      async ({ world_name }) => {
        const backups = backupManager.listBackups(world_name);
        if (backups.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: world_name
                  ? `No backups found for world "${world_name}".`
                  : "No backups found.",
              },
            ],
          };
        }
    
        const lines = backups.map(
          (b) =>
            `📦 ${b.name} | ${b.sizeMB} MB | ${b.timestamp.toISOString()}`
        );
        return {
          content: [
            {
              type: "text",
              text: `Found ${backups.length} backup(s):\n${lines.join("\n")}`,
            },
          ],
        };
      }
    );
Behavior3/5

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

No annotations provided, so description carries full burden. Adds 'all available' indicating scope and 'optionally filtered' indicating behavior. However, fails to disclose return format, read-only nature (though implied by verb), or performance characteristics (e.g., if listing large backup sets is expensive).

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?

Single sentence, front-loaded with the core action. No redundant words. Efficiently communicates the essential operation and the single optional parameter in 68 characters.

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?

Adequate for a simple 1-parameter read operation with self-evident purpose in the Minecraft server context. Given no output schema exists,-description could have noted what backup metadata is returned (filename, date, size), but absence is acceptable given low complexity.

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

Parameters3/5

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

Schema coverage is 100% with clear description 'Filter by world name (optional)'. Description mirrors this with 'optionally filtered by world name' but adds no additional semantic value—no format constraints, examples, or validation details beyond the schema.

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?

Clear verb 'List' and resource 'world backups'. Specifies scope ('all available') and filtering capability. However, lacks explicit differentiation from siblings like 'create_backup' or 'restore_backup' that would clarify this is view-only.

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?

Mentions optional filtering ('optionally filtered by world name') but provides no guidance on when to use this versus 'restore_backup', 'delete_backup', or 'create_backup'. No prerequisites or conditions mentioned.

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/tamo2918/Minecraft-Server-MCP'

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