send-chat
Send in-game chat messages using a Minecraft MCP server powered by the Mineflayer API. Ideal for automating communication or commands within the game environment.
Instructions
Send a chat message in-game
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message to send in chat |
Implementation Reference
- src/tools/chat-tools.ts:13-17 (handler)The async handler function that executes the 'send-chat' tool logic: retrieves the bot instance, sends the chat message using bot.chat(message), and returns a confirmation response.async ({ message }) => { const bot = getBot(); bot.chat(message); return factory.createResponse(`Sent message: "${message}"`); }
- src/tools/chat-tools.ts:10-12 (schema)Zod schema defining the input parameter 'message' as a string for the 'send-chat' tool.{ message: z.string().describe("Message to send in chat") },
- src/tools/chat-tools.ts:7-18 (registration)Registration of the 'send-chat' tool with name, description, input schema, and handler function using factory.registerTool.factory.registerTool( "send-chat", "Send a chat message in-game", { message: z.string().describe("Message to send in chat") }, async ({ message }) => { const bot = getBot(); bot.chat(message); return factory.createResponse(`Sent message: "${message}"`); } );