Skip to main content
Glama

delete_world

Delete Minecraft world folders permanently when the server is stopped. Requires confirmation to prevent accidental data loss. Always create backups before using this irreversible action.

Instructions

Delete a world folder. WARNING: This is irreversible! Consider creating a backup first. The server must be stopped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
world_nameYesWorld folder name to delete
confirmYesMust be true to confirm deletion

Implementation Reference

  • The `delete_world` tool handler logic, which checks for the confirmation flag and server status before calling the `WorldManager` to perform the deletion.
    server.tool(
      "delete_world",
      "Delete a world folder. WARNING: This is irreversible! Consider creating a backup first. The server must be stopped.",
      {
        world_name: z.string().describe("World folder name to delete"),
        confirm: z
          .boolean()
          .describe("Must be true to confirm deletion"),
      },
      async ({ world_name, confirm }) => {
        if (!confirm) {
          return {
            content: [
              {
                type: "text",
                text: "Deletion cancelled. Set confirm=true to proceed.",
              },
            ],
          };
        }
    
        if (manager.isRunning()) {
          return {
            content: [
              {
                type: "text",
                text: "Cannot delete a world while the server is running. Stop the server first.",
              },
            ],
            isError: true,
          };
        }
    
        try {
          const deleted = worldManager.deleteWorld(world_name);
          if (deleted) {
            return {
              content: [
                {
                  type: "text",
                  text: `World "${world_name}" has been deleted.`,
                },
              ],
            };
          }
          return {
            content: [
              { type: "text", text: `World "${world_name}" not found.` },
            ],
            isError: true,
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
  • Registration of the `delete_world` tool name in the MCP server.
    "delete_world",
  • The underlying `WorldManager.deleteWorld` method that performs the actual file system deletion.
    deleteWorld(worldName: string): boolean {
      // Safety: prevent path traversal
Behavior4/5

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

With no annotations provided, the description carries full disclosure burden. It successfully communicates irreversible destruction, server state requirement, and suggests backup mitigation. Minor gap: doesn't describe failure mode if server is running or return value format.

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?

Four sentences, each earning its place: purpose declaration, risk warning, mitigation suggestion, and prerequisite. Front-loaded with action. No redundancy or waste despite handling a destructive operation.

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?

Given 100% schema coverage, no annotations, and no output schema, the description adequately covers critical safety and operational requirements (irreversibility, server state, backups). Appropriately complete for a 2-parameter destructive tool, though output description is absent.

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%, so schema already fully documents both parameters. The description adds implicit context that 'world_name' refers to the folder being deleted, but doesn't extend beyond schema definitions for parameter syntax or semantics.

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

Purpose5/5

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

The description uses specific verb 'Delete' with resource 'world folder', clearly distinguishing from sibling delete_backup (which deletes backups, not worlds). The scope is immediately clear.

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

Usage Guidelines5/5

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

Explicitly states prerequisite 'The server must be stopped', references sibling tool create_backup ('Consider creating a backup first'), and warns about irreversibility. Provides clear when-to-use and safety alternatives.

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