Skip to main content
Glama

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
NameRequiredDescriptionDefault
weatherYesWeather type
durationNoDuration in seconds (optional)

Implementation Reference

  • 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",
  • 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)"),
    },
  • Registration of the 'set_weather' tool within the MCP server instance.
    server.tool(
      "set_weather",
      "Set the weather. Options: clear, rain, thunder.",

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/tamo2918/Minecraft-Server-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server