Skip to main content
Glama

get_world_info

Retrieve world details from Minecraft server level.dat files, including seed, spawn coordinates, game type, and version information for server administration.

Instructions

Get detailed information about a world from its level.dat file, including seed, spawn point, game type, and version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
world_nameYesWorld folder name (e.g., 'world')

Implementation Reference

  • The 'get_world_info' tool is defined here, with its input schema and handler logic. It retrieves world information using the worldManager service.
    // --- Get World Info ---
    server.tool(
      "get_world_info",
      "Get detailed information about a world from its level.dat file, including seed, spawn point, game type, and version.",
      {
        world_name: z.string().describe("World folder name (e.g., 'world')"),
      },
      async ({ world_name }) => {
        const info = await worldManager.getWorldInfo(world_name);
        if (!info) {
          return {
            content: [
              { type: "text", text: `World "${world_name}" not found.` },
            ],
            isError: true,
          };
        }
    
        const structure = worldManager.getWorldStructure(world_name);
        const size = worldManager.getWorldSize(world_name);
        const datapacks = worldManager.listDataPacks(world_name);
    
        const gameTypes = ["Survival", "Creative", "Adventure", "Spectator"];
        const difficulties = ["Peaceful", "Easy", "Normal", "Hard"];
    
        const lines = [
          `World: ${info.levelName} (${world_name})`,
          `Version: ${info.version ?? "Unknown"}`,
          `Data Version: ${info.dataVersion ?? "Unknown"}`,
          `Size: ${size.toFixed(1)} MB`,
          ``,
          `--- Generation ---`,
          `Seed: ${info.seed}`,
          `Game Type: ${gameTypes[info.gameType] ?? info.gameType}`,
          `Difficulty: ${difficulties[info.difficulty] ?? info.difficulty}`,
          `Hardcore: ${info.hardcore}`,
          ``,
          `--- Spawn Point ---`,
          `X: ${info.spawnX}, Y: ${info.spawnY}, Z: ${info.spawnZ}`,
          ``,
          `--- Time ---`,
          `Day Time: ${info.dayTime} ticks (Day ${Math.floor(info.dayTime / 24000)})`,
          `Last Played: ${info.lastPlayed > 0 ? new Date(Number(info.lastPlayed)).toISOString() : "Unknown"}`,
          ``,
          `--- Structure ---`,
          ...Object.entries(structure).map(
            ([name, exists]) => `  ${exists ? "✅" : "❌"} ${name}`
          ),
          ``,
          `--- Data Packs ---`,
          datapacks.length > 0 ? datapacks.join(", ") : "None",
        ];
        return { content: [{ type: "text", text: 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. Successfully identifies data source (level.dat) and specific extracted fields. However, lacks explicit read-only safety confirmation, return format specification (JSON object?), or error conditions (world not found?).

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 dense sentence, front-loaded action verb. Every clause serves purpose: operation (Get), scope (detailed information), source (level.dat file), and specific return values listed. No redundancy.

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?

For a simple 1-parameter read tool, reasonably complete despite missing output schema. Description compensates by enumerating specific return values (seed, spawn, etc.). Would benefit from mentioning return format or structure.

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 of world_name parameter ('World folder name'). Description implies the target world but does not add parameter-specific guidance beyond schema. Baseline 3 appropriate for high schema coverage.

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?

Excellent specificity: verb 'Get' + resource 'world...level.dat file' + specific attributes (seed, spawn point, game type, version). Clearly distinguishes from sibling list_worlds (simple listing) by specifying detailed metadata extraction from the level.dat data file.

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

Usage Guidelines3/5

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

Lacks explicit when-to-use guidance or explicit alternatives comparison. However, the specificity of 'from its level.dat file' and enumeration of returned fields provides implicit context that this is for deep metadata inspection versus simple listing.

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