Skip to main content
Glama
robobobby
by robobobby

dk_weather_forecast

Get weather forecasts for Danish locations with hourly or daily precision using DMI and ECMWF models for up to 16 days.

Instructions

Get hourly or daily weather forecast for a location in Denmark. Uses DMI HARMONIE 2km model for the first 2.5 days, then ECMWF for up to 16 days.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesDanish city name, postal code, or lat,lon coordinates
daysNoForecast days (default 3, max 16)
modeNoHourly detail or daily summary (default: daily)

Implementation Reference

  • The dk_weather_forecast tool implementation, including schema definition and request handling logic.
    server.tool(
      "dk_weather_forecast",
      "Get hourly or daily weather forecast for a location in Denmark. Uses DMI HARMONIE 2km model for the first 2.5 days, then ECMWF for up to 16 days.",
      {
        location: z.string().describe("Danish city name, postal code, or lat,lon coordinates"),
        days: z.number().min(1).max(16).optional().describe("Forecast days (default 3, max 16)"),
        mode: z.enum(["hourly", "daily"]).optional().describe("Hourly detail or daily summary (default: daily)"),
      },
      async ({ location, days, mode }) => {
        try {
          const loc = await getLocation(location);
          const forecastDays = days || 3;
          const isHourly = mode === "hourly";
    
          const params = { latitude: loc.lat, longitude: loc.lon, forecast_days: forecastDays };
          if (isHourly) {
            params.hourly = "temperature_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_gusts_10m,cloud_cover";
          } else {
            params.daily = "weather_code,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,precipitation_sum,wind_speed_10m_max,wind_gusts_10m_max,wind_direction_10m_dominant";
          }
    
          const data = await openMeteoFetch(params);
          const lines = [`## ${loc.name} — ${forecastDays}-Day Forecast\n`];
    
          if (isHourly) {
            const h = data.hourly;
            for (let i = 0; i < h.time.length; i++) {
              const t = new Date(h.time[i]);
              const time = t.toLocaleString("da-DK", { timeZone: "Europe/Copenhagen", weekday: "short", day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" });
              const wx = WMO_CODES[h.weather_code[i]] || "";
              lines.push(`**${time}:** ${h.temperature_2m[i]}°C (feels ${h.apparent_temperature[i]}°C), ${wx}, wind ${h.wind_speed_10m[i]} km/h, precip ${h.precipitation[i]} mm`);
            }
          } else {
            const d = data.daily;
            for (let i = 0; i < d.time.length; i++) {
              const date = new Date(d.time[i]);
              const day = date.toLocaleDateString("da-DK", { timeZone: "Europe/Copenhagen", weekday: "long", day: "numeric", month: "long" });
              const wx = WMO_CODES[d.weather_code[i]] || "";
              const sunrise = d.sunrise[i]?.split("T")[1] || "";
              const sunset = d.sunset[i]?.split("T")[1] || "";
              lines.push(`### ${day}`);
              lines.push(`${wx} | ${d.temperature_2m_min[i]}°C to ${d.temperature_2m_max[i]}°C (feels ${d.apparent_temperature_min[i]}° to ${d.apparent_temperature_max[i]}°)`);
              lines.push(`Wind: up to ${d.wind_speed_10m_max[i]} km/h (gusts ${d.wind_gusts_10m_max[i]} km/h) from ${d.wind_direction_10m_dominant[i]}°`);
              lines.push(`Precipitation: ${d.precipitation_sum[i]} mm | ☀️ ${sunrise} — ${sunset}\n`);
            }
          }
    
          lines.push(`*DMI HARMONIE 2km model via Open-Meteo*`);
          return { content: [{ type: "text", text: lines.join("\n") }] };
        } catch (err) {
          return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
        }
      }
    );
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and adds valuable behavioral context beyond what the schema provides. It discloses the forecast models used (DMI HARMONIE 2km for first 2.5 days, ECMWF for up to 16 days), which helps the agent understand data sources and temporal accuracy limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each earn their place. The first sentence states the core functionality, and the second provides important technical context about forecast models without redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no annotations and no output schema, the description provides good context about geographical scope (Denmark) and forecast models. However, it doesn't describe the return format or structure, which would be helpful given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for adequate coverage through structured data alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Get hourly or daily weather forecast') and resource ('for a location in Denmark'). It distinguishes itself from siblings like dk_current_weather (current vs forecast) and dk_compare_weather (comparison vs single forecast).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'Denmark' and mentioning the forecast models, but doesn't explicitly state when to use this tool versus alternatives like dk_current_weather or dk_compare_weather. No explicit exclusions or prerequisites are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/robobobby/mcp-nordic'

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