send-chat
Send chat messages in Minecraft through an MCP server, enabling AI-controlled characters to communicate in-game.
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/bot.ts:539-546 (handler)The handler function for the 'send-chat' tool. It sends the provided message using bot.chat(message) and returns a success response or error.async ({ message }): Promise<McpResponse> => { try { bot.chat(message); return createResponse(`Sent message: "${message}"`); } catch (error) { return createErrorResponse(error as Error); } }
- src/bot.ts:536-538 (schema)Input schema for the 'send-chat' tool, defining a required 'message' parameter as a string.{ message: z.string().describe("Message to send in chat") },
- src/bot.ts:532-548 (registration)Registers the 'send-chat' tool with the MCP server, including name, description, schema, and handler function.function registerChatTools(server: McpServer, bot: any) { server.tool( "send-chat", "Send a chat message in-game", { message: z.string().describe("Message to send in chat") }, async ({ message }): Promise<McpResponse> => { try { bot.chat(message); return createResponse(`Sent message: "${message}"`); } catch (error) { return createErrorResponse(error as Error); } } ); }