send-chat
Send chat messages in Minecraft to communicate with players or execute commands through the MCP server.
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 handler function that executes the tool logic: retrieves the bot and calls bot.chat(message), then returns a response.async ({ message }) => { const bot = getBot(); bot.chat(message); return factory.createResponse(`Sent message: "${message}"`); }
- src/tools/chat-tools.ts:10-12 (schema)Input schema definition using Zod for the 'message' parameter.{ message: z.string().describe("Message to send in chat") },
- src/tools/chat-tools.ts:7-18 (registration)Registration of the 'send-chat' tool using factory.registerTool, including name, description, schema, and inline handler.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}"`); } );