Skip to main content
Glama

setup_world

Configure Minecraft server world generation settings including level name, seed, world type, and difficulty to create a new world. Requires server restart after configuration.

Instructions

Configure server.properties for generating a new world. Sets the level name, seed, world type, and other generation options. The server must be restarted (with the old world deleted or renamed) to generate the new world.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
level_nameYesWorld folder name (e.g., 'world', 'creative_world')
seedNoWorld seed (blank for random)
world_typeNoWorld generation typeminecraft:normal
gamemodeNoDefault game modesurvival
difficultyNoDifficulty leveleasy
hardcoreNoEnable hardcore mode
generate_structuresNoGenerate villages, temples, etc.
generator_settingsNoJSON string for superflat/custom world generation settings
spawn_protectionNoSpawn protection radius in blocks

Implementation Reference

  • Implementation of the 'setup_world' tool. This tool configures the server.properties file with world generation settings, requiring a server restart to take effect.
    server.tool(
      "setup_world",
      "Configure server.properties for generating a new world. Sets the level name, seed, world type, and other generation options. The server must be restarted (with the old world deleted or renamed) to generate the new world.",
      {
        level_name: z.string().describe("World folder name (e.g., 'world', 'creative_world')"),
        seed: z.string().optional().describe("World seed (blank for random)"),
        world_type: z
          .enum([
            "minecraft:normal",
            "minecraft:flat",
            "minecraft:large_biomes",
            "minecraft:amplified",
            "minecraft:single_biome_surface",
          ])
          .optional()
          .default("minecraft:normal")
          .describe("World generation type"),
        gamemode: z
          .enum(["survival", "creative", "adventure", "spectator"])
          .optional()
          .default("survival")
          .describe("Default game mode"),
        difficulty: z
          .enum(["peaceful", "easy", "normal", "hard"])
          .optional()
          .default("easy")
          .describe("Difficulty level"),
        hardcore: z.boolean().optional().default(false).describe("Enable hardcore mode"),
        generate_structures: z
          .boolean()
          .optional()
          .default(true)
          .describe("Generate villages, temples, etc."),
        generator_settings: z
          .string()
          .optional()
          .describe("JSON string for superflat/custom world generation settings"),
        spawn_protection: z
          .number()
          .optional()
          .default(16)
          .describe("Spawn protection radius in blocks"),
      },
      async (params) => {
        const properties: Record<string, string> = {
          "level-name": params.level_name,
          "level-type": params.world_type.replace(":", "\\:"),
          gamemode: params.gamemode,
          difficulty: params.difficulty,
          hardcore: String(params.hardcore),
          "generate-structures": String(params.generate_structures),
          "spawn-protection": String(params.spawn_protection),
        };
    
        if (params.seed !== undefined) {
          properties["level-seed"] = params.seed;
        }
        if (params.generator_settings !== undefined) {
          properties["generator-settings"] = params.generator_settings;
        }
    
        manager.properties.setMultiple(properties);
    
        const lines = [
          `World configuration set:`,
          `  Name: ${params.level_name}`,
          `  Seed: ${params.seed || "(random)"}`,
          `  Type: ${params.world_type}`,
          `  Gamemode: ${params.gamemode}`,
          `  Difficulty: ${params.difficulty}`,
          `  Hardcore: ${params.hardcore}`,
          `  Structures: ${params.generate_structures}`,
          ``,
          `To generate this world:`,
          `1. Stop the server if running`,
          `2. Delete or rename the existing world folder ("${params.level_name}") if it exists`,
          `3. Start the server - it will generate a new world with these settings`,
        ];
        return { content: [{ type: "text", text: lines.join("\n") }] };
      }
    );
Behavior4/5

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

No annotations provided, so description carries full burden. Effectively discloses deferred effect (requires restart) and destructive prerequisite (old world deletion/renaming). Missing minor details like persistence guarantees or validation behavior, but covers main operational constraints well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with logical flow: purpose → scope → operational constraints. No redundant phrases. Sentence 2 enumerates key parameters which aids quick scanning despite schema completeness.

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 9-parameter configuration tool. Explains the file being modified (server.properties), the deferred generation behavior, and world replacement requirements. No output schema exists, but description covers the essential behavioral contract.

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 description coverage is 100%, so baseline applies. Description mentions 'level name, seed, world type' which correspond to actual parameters, but adds no syntax, format, or dependency information beyond what's in 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-resource combination ('Configure server.properties for generating a new world'). Specific scope distinguishes it from generic property setters like set_server_property, though it doesn't explicitly name sibling alternatives.

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

Usage Guidelines4/5

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

Explicitly states critical prerequisite: 'The server must be restarted (with the old world deleted or renamed) to generate the new world.' This explains when effects take place and implies workflow. Could be improved by explicitly referencing delete_world or restart_server siblings.

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