Skip to main content
Glama
Mming-Lab
by Mming-Lab

world

Control and manage Minecraft Bedrock world settings: adjust time, weather, day/night cycles, query world data, send messages, execute commands, and sequence actions for precise server operations.

Instructions

World management: time, weather, environment, day/night cycles, world queries, connections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWorld management action to perform
commandNoMinecraft Bedrock Edition command to execute (without /). For correct syntax and available commands, use the minecraft_wiki tool to search for specific command information. Examples: "give @p diamond_sword", "tp @p 0 64 0", "setblock ~ ~ ~ stone"
durationNoWeather duration in ticks (optional)
messageNoMessage to send to all players
stepsNoArray of world actions for sequence. Each step should have "type" field and relevant parameters.
targetNoTarget player for message (optional, defaults to all players)
timeNoTime in ticks (0-24000, where 0=dawn, 6000=noon, 12000=dusk, 18000=midnight)
weatherNoWeather type to set

Implementation Reference

  • Main handler function that processes input arguments and executes world management operations based on the 'action' parameter (e.g., set_time, get_time, set_weather, run_command). Uses this.world from socket-be to interact with Minecraft.
    async execute(args: {
        action: string;
        time?: number;
        weather?: string;
        duration?: number;
        message?: string;
        target?: string;
        command?: string;
        steps?: SequenceStep[];
    }): Promise<ToolCallResult> {
        if (!this.world) {
            return { success: false, message: 'World not available. Ensure Minecraft is connected.' };
        }
    
        try {
            const { action } = args;
            let result: any;
            let message: string;
    
            switch (action) {
                case 'set_time':
                    if (args.time === undefined) return { success: false, message: 'Time required for set_time' };
                    await this.world.setTimeOfDay(args.time);
                    const timeDesc = this.getTimeDescription(args.time);
                    message = `Time set to ${args.time} ticks (${timeDesc})`;
                    break;
    
                case 'get_time':
                    const currentTime = await this.world.getTimeOfDay();
                    const currentDay = await this.world.getDay();
                    const currentTick = await this.world.getCurrentTick();
                    result = { 
                        timeOfDay: currentTime, 
                        day: currentDay, 
                        totalTicks: currentTick,
                        description: this.getTimeDescription(currentTime)
                    };
                    message = `Current time: ${currentTime} ticks (${this.getTimeDescription(currentTime)}) on day ${currentDay}`;
                    break;
    
                case 'get_day':
                    result = await this.world.getDay();
                    message = `Current day: ${result}`;
                    break;
    
                case 'set_weather':
                    if (!args.weather) return { success: false, message: 'Weather required for set_weather' };
                    const weatherType = this.normalizeWeatherType(args.weather);
                    await this.world.setWeather(weatherType, args.duration);
                    message = args.duration ? 
                        `Weather set to ${args.weather} for ${args.duration} ticks` :
                        `Weather set to ${args.weather}`;
                    break;
    
                case 'get_weather':
                    result = await this.world.getWeather();
                    message = `Current weather: ${result}`;
                    break;
    
                case 'get_players':
                    const players = await this.world.getPlayers();
                    const playerInfo = players.map(p => ({ name: p.name, isLocal: p.isLocalPlayer }));
                    result = playerInfo;
                    message = `Found ${players.length} players online`;
                    break;
    
                case 'get_world_info':
                    result = {
                        name: this.world.name,
                        connectedAt: this.world.connectedAt,
                        averagePing: this.world.averagePing,
                        maxPlayers: this.world.maxPlayers,
                        isValid: this.world.isValid
                    };
                    message = `World info retrieved: ${this.world.name}`;
                    break;
    
                case 'send_message':
                    if (!args.message) return { success: false, message: 'Message required for send_message' };
                    await this.world.sendMessage(args.message, args.target);
                    message = args.target ? 
                        `Message sent to ${args.target}: "${args.message}"` :
                        `Message sent to all players: "${args.message}"`;
                    break;
    
                case 'run_command':
                    if (!args.command) return { success: false, message: 'Command required for run_command' };
                    result = await this.world.runCommand(args.command);
                    message = `Command executed: ${args.command}`;
                    break;
    
                case 'get_connection_info':
                    result = {
                        averagePing: this.world.averagePing,
                        connectedAt: this.world.connectedAt,
                        maxPlayers: this.world.maxPlayers,
                        isValid: this.world.isValid
                    };
                    message = 'Connection info retrieved';
                    break;
    
                case 'sequence':
                    if (!args.steps) {
                        return this.createErrorResponse('steps array is required for sequence action');
                    }
                    return await this.executeSequence(args.steps as SequenceStep[]);
    
                default:
                    return { success: false, message: `Unknown action: ${action}` };
            }
    
            return {
                success: true,
                message: message,
                data: { action, result, timestamp: Date.now() }
            };
    
        } catch (error) {
            return {
                success: false,
                message: `World management error: ${error instanceof Error ? error.message : String(error)}`
            };
        }
    }
  • Defines the input schema for the 'world' tool, specifying properties like action (required, enum of actions), time, weather, etc., for validation.
    readonly inputSchema: InputSchema = {
        type: 'object',
        properties: {
            action: {
                type: 'string',
                description: 'World management action to perform',
                enum: [
                    'set_time', 'get_time', 'get_day', 'set_weather', 'get_weather',
                    'get_players', 'get_world_info', 'send_message', 'run_command',
                    'get_connection_info', 'sequence'
                ]
            },
            time: {
                type: 'number',
                description: 'Time in ticks (0-24000, where 0=dawn, 6000=noon, 12000=dusk, 18000=midnight)',
                minimum: 0,
                maximum: 24000
            },
            weather: {
                type: 'string',
                description: 'Weather type to set',
                enum: ['clear', 'rain', 'thunder']
            },
            duration: {
                type: 'number',
                description: 'Weather duration in ticks (optional)',
                minimum: 0
            },
            message: {
                type: 'string',
                description: 'Message to send to all players'
            },
            target: {
                type: 'string',
                description: 'Target player for message (optional, defaults to all players)'
            },
            command: {
                type: 'string',
                description: 'Minecraft Bedrock Edition command to execute (without /). For correct syntax and available commands, use the minecraft_wiki tool to search for specific command information. Examples: "give @p diamond_sword", "tp @p 0 64 0", "setblock ~ ~ ~ stone"'
            },
            steps: {
                type: 'array',
                description: 'Array of world actions for sequence. Each step should have "type" field and relevant parameters.'
            }
        },
        required: ['action']
    };
  • src/server.ts:348-372 (registration)
    Registers the WorldTool instance in the tools array during server initialization. These tools are later registered to the MCP server using their .name property in registerModularTools().
    this.tools = [
      // Socket-BE Core API ツール(推奨 - シンプルでAI使いやすい)
      new AgentTool(),
      new WorldTool(),
      new PlayerTool(),
      new BlocksTool(),
      new SystemTool(),
      new CameraTool(),
      new SequenceTool(),
      new MinecraftWikiTool(),
    
      // Advanced Building ツール(高レベル建築機能)
      new BuildCubeTool(), // ✅ 完全動作
      new BuildLineTool(), // ✅ 完全動作
      new BuildSphereTool(), // ✅ 完全動作
      new BuildCylinderTool(), // ✅ 修正済み
      new BuildParaboloidTool(), // ✅ 基本動作
      new BuildHyperboloidTool(), // ✅ 基本動作
      new BuildRotateTool(), // ✅ 基本動作
      new BuildTransformTool(), // ✅ 基本動作
      new BuildTorusTool(), // ✅ 修正完了
      new BuildHelixTool(), // ✅ 修正完了
      new BuildEllipsoidTool(), // ✅ 修正完了
      new BuildBezierTool(), // ✅ 新規追加(可変制御点ベジェ曲線)
    ];
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'management' which implies mutation capabilities (e.g., set_time, set_weather, run_command), but doesn't specify permissions required, side effects, or what happens with invalid inputs. It lists functional areas but doesn't describe how operations interact with the world or players. For a multi-action tool with potential mutations, this is inadequate.

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?

The description is a single, efficient phrase listing key functional areas. It's appropriately sized and front-loaded with the core purpose ('World management'). However, it could be more structured by grouping related actions or indicating primary vs. secondary functions, but it avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, multiple action types including mutations like 'run_command'), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects, error handling, or return values, leaving significant gaps for an AI agent to understand how to use it effectively. The schema covers parameters well, but the description fails to compensate for missing context elsewhere.

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 the schema already documents all 8 parameters thoroughly with descriptions, enums, and constraints. The description adds no parameter-specific information beyond what's in the schema—it doesn't explain relationships between parameters (e.g., how 'action' determines which other parameters are relevant) or provide usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose3/5

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

The description 'World management: time, weather, environment, day/night cycles, world queries, connections' lists functional areas but lacks a specific verb or clear scope. It mentions 'management' which implies control operations, but doesn't distinguish this from sibling tools like 'execute_command', 'send_message', or 'sequence' which overlap with some of its capabilities. The description is somewhat vague about what exactly this tool does versus others.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'execute_command', 'send_message', and 'sequence' that handle similar actions (e.g., running commands, sending messages, sequencing actions), there's no indication of when this tool's 'action' parameter should be preferred over those dedicated tools. No exclusions or prerequisites are 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

Related Tools

  • @Mming-Lab/minecraft-bedrock-mcp-server
  • @Mming-Lab/minecraft-bedrock-mcp-server
  • @Mming-Lab/minecraft-bedrock-mcp-server
  • @Mming-Lab/minecraft-bedrock-mcp-server
  • @Mming-Lab/minecraft-bedrock-mcp-server
  • @Mming-Lab/minecraft-bedrock-mcp-server

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/Mming-Lab/minecraft-bedrock-mcp-server'

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