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

send_message

Send chat messages to Minecraft Bedrock players via the MCP server. Enables clear communication for build progress, instructions, or updates during gameplay.

Instructions

Send a chat message to the connected Minecraft player. ALWAYS provide a message parameter. Use this to communicate with the player about build progress or instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe text message to send to the player (REQUIRED - never call this without a message)

Implementation Reference

  • src/server.ts:404-439 (registration)
    Registration of the 'send_message' MCP tool, including Zod input schema and async handler that delegates to server.sendMessage and returns formatted response.
    this.mcpServer.registerTool(
      "send_message",
      {
        title: "Send Message",
        description:
          "Send a chat message to the connected Minecraft player. ALWAYS provide a message parameter. Use this to communicate with the player about build progress or instructions.",
        inputSchema: {
          message: z
            .string()
            .describe(
              "The text message to send to the player (REQUIRED - never call this without a message)"
            ),
        },
      },
      async ({ message }: { message: string }) => {
        const result = await this.sendMessage(message || "Hello from MCP server!");
    
        let responseText: string;
        if (result.success) {
          responseText = result.message || "Message sent successfully";
        } else {
          // エラーメッセージにヒントを追加
          const errorMsg = result.message || "Failed to send message";
          responseText = `❌ ${enrichErrorWithHints(errorMsg)}`;
        }
    
        return {
          content: [
            {
              type: "text",
              text: responseText,
            },
          ],
        };
      }
    );
  • Core handler method that sends the message to the current Minecraft world/player, with connection checks, logging, and error handling.
    public async sendMessage(text: string): Promise<ToolCallResult> {
      if (!this.currentWorld) {
        if (process.stdin.isTTY !== false) {
          console.error("エラー: プレイヤーが接続されていません");
        }
        return { success: false, message: "No player connected" };
      }
    
      try {
        if (process.stdin.isTTY !== false) {
          console.error(`メッセージ送信: ${text}`);
        }
    
        await this.currentWorld.sendMessage(text);
        return { success: true, message: "Message sent successfully" };
      } catch (error) {
        if (process.stdin.isTTY !== false) {
          console.error("メッセージ送信エラー:", error);
        }
        return { success: false, message: `Failed to send message: ${error}` };
      }
    }
  • Input schema for the 'send_message' tool: requires a string 'message' validated with Zod.
    {
      title: "Send Message",
      description:
        "Send a chat message to the connected Minecraft player. ALWAYS provide a message parameter. Use this to communicate with the player about build progress or instructions.",
      inputSchema: {
        message: z
          .string()
          .describe(
            "The text message to send to the player (REQUIRED - never call this without a message)"
          ),
      },
Behavior3/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 that the message is sent to the 'connected Minecraft player', implying a real-time interaction, but doesn't cover aspects like rate limits, delivery confirmation, or error handling. It adds some context but leaves gaps in behavioral traits.

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 front-loaded with the core purpose and includes a usage guideline, making it efficient. However, the second sentence could be more tightly integrated, and it slightly repeats the schema's emphasis on the required parameter, reducing optimal conciseness.

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

Completeness3/5

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

Given the tool's low complexity (single parameter, no output schema, no annotations), the description is moderately complete. It covers the basic purpose and usage but lacks details on behavioral aspects like response handling or limitations, which would be beneficial for an AI agent in this context.

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?

The schema description coverage is 100%, so the input schema already documents the 'message' parameter thoroughly. The description reinforces that 'ALWAYS provide a message parameter' but doesn't add semantic meaning beyond what the schema provides, such as examples or formatting tips, meeting the baseline for high coverage.

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?

The description clearly states the action ('Send a chat message') and target ('to the connected Minecraft player'), which is specific and actionable. However, it doesn't explicitly distinguish this tool from sibling tools like 'execute_command' or 'player', which might also involve communication, so it misses full sibling differentiation.

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?

The description provides clear context for when to use this tool ('to communicate with the player about build progress or instructions'), which is helpful. It doesn't specify when not to use it or name explicit alternatives among the siblings, such as 'execute_command' for other types of commands, so it lacks full exclusion guidance.

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

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