set_weather
Change Minecraft server weather conditions to clear, rain, or thunder with optional duration control for server administration.
Instructions
Set the weather. Options: clear, rain, thunder.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| weather | Yes | Weather type | |
| duration | No | Duration in seconds (optional) |
Implementation Reference
- src/tools/command-tools.ts:123-134 (handler)The handler function for 'set_weather' that constructs and sends the RCON command.
async ({ weather, duration }) => { const cmd = duration ? `weather ${weather} ${duration}` : `weather ${weather}`; try { const response = await manager.rcon.send(cmd); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", - src/tools/command-tools.ts:116-122 (schema)Input schema definition for the 'set_weather' tool using Zod.
{ weather: z.enum(["clear", "rain", "thunder"]).describe("Weather type"), duration: z .number() .optional() .describe("Duration in seconds (optional)"), }, - src/tools/command-tools.ts:113-115 (registration)Registration of the 'set_weather' tool within the MCP server instance.
server.tool( "set_weather", "Set the weather. Options: clear, rain, thunder.",