Skip to main content
Glama
robobobby
by robobobby

fi_weather_forecast

Get weather forecasts for Finnish locations up to 16 days ahead with hourly or daily detail options.

Instructions

Get hourly or daily weather forecast for a location in Finland. Up to 16 days ahead.

Input Schema

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

Implementation Reference

  • The handler for the 'fi_weather_forecast' tool. It fetches location coordinates, prepares Open-Meteo API parameters, and processes the response into a formatted string.
    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,snowfall,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,snowfall_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("fi-FI", { timeZone: "Europe/Helsinki", weekday: "short", day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" });
            const wx = WMO_CODES[h.weather_code[i]] || "";
            const snow = h.snowfall[i] > 0 ? `, snow ${h.snowfall[i]} cm` : "";
            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${snow}`);
          }
        } 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("fi-FI", { timeZone: "Europe/Helsinki", 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] || "";
            const snow = d.snowfall_sum[i] > 0 ? `\nSnowfall: ${d.snowfall_sum[i]} cm` : "";
            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${snow} | ☀️ ${sunrise} — ${sunset}\n`);
          }
        }
    
        lines.push(`*Open-Meteo forecast (Europe/Helsinki)*`);
        return { content: [{ type: "text", text: lines.join("\n") }] };
      } catch (err) {
        return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true };
      }
  • Registration of the 'fi_weather_forecast' tool, including input schema validation using Zod.
    server.tool(
      "fi_weather_forecast",
      "Get hourly or daily weather forecast for a location in Finland. Up to 16 days ahead.",
      {
        location: z.string().describe("Finnish city name 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)"),
      },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the forecast range ('Up to 16 days ahead') but lacks details on rate limits, authentication needs, error handling, or response format. For a tool with no annotations, this is insufficient to inform safe and effective use.

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 concise and front-loaded with essential information in two sentences. It efficiently conveys the core functionality without unnecessary details, making it easy to scan and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and scope but lacks behavioral details and usage guidelines, which are needed for a fully informed agent. The absence of an output schema means the description should ideally hint at return values, but it does not.

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 input schema fully documents parameters. The description adds minimal value beyond the schema by implying the tool supports both hourly and daily forecasts and a 16-day limit, but does not provide additional semantic context or examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/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: 'Get hourly or daily weather forecast for a location in Finland. Up to 16 days ahead.' It specifies the action ('Get'), resource ('weather forecast'), and scope ('Finland'), but does not explicitly differentiate it from sibling tools like 'fi_current_weather' or 'fi_compare_weather', which prevents a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools (e.g., 'fi_current_weather' for current conditions or 'fi_compare_weather' for comparisons), nor does it specify prerequisites or exclusions, leaving usage context unclear.

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