Skip to main content
Glama
nanwer
by nanwer

get_weather_forecast

Get a 7-day weather forecast for any city or coordinates to plan travel activities and packing. Checks conditions, precipitation probability, and temperature range for trip dates.

Instructions

🎯 RENDERING DIRECTIVE — READ FIRST. When this tool returns 3+ forecast days, render them as an HTML/React artifact — a horizontal day-strip or 7-day card grid with one tile per day (day name + emoji icon + high/low + precip%), NOT a paragraph or table-in-prose. 1-2 days may be prose. If used as context inside a trip plan, embed the strip inside the plan's artifact.

Get a 7-day weather forecast for a city or specific coordinates. Powered by Open-Meteo (free, global, no API key required).

USE THIS TOOL WHEN:

  • The user is planning a trip and packing or scheduling decisions hinge on weather ("will it rain in Lisbon next week", "what's the weather like in Tokyo for the second week of March")

  • The user is comparing dates and wants to bias toward sunnier ones

  • You're already showing flight or stay options and want to enrich them with a weather context line ("FYI, expect rain Thursday — bias indoor activities")

Inputs:

  • location (string) — free-text city or neighborhood. Resolved to coordinates via OpenStreetMap Nominatim. Examples: "Tampere, Finland", "Notting Hill, London".

  • OR latitude + longitude (floats) — direct coordinates, skip the geocoding step.

  • start_date (YYYY-MM-DD) — optional. Defaults to today (UTC).

  • end_date (YYYY-MM-DD) — optional. Defaults to start_date + 6 days. Hard cap: forecast horizon is 7 days from today.

  • units"metric" (default, °C, km/h) or "imperial" (°F, mph).

Returns a GetWeatherForecastResult with:

  • location — echoed/resolved label

  • latitude, longitude, timezone — the resolved coordinates and IANA timezone

  • units"metric" or "imperial"

  • days[] — list of WeatherDay (date, high_temp, low_temp, temp_unit, condition_summary, weather_code, precipitation_probability_percent, sunrise, sunset)

PRE-CALL ELICITATION:

  • For "weather in X" with no date hint, default to a 7-day forecast starting today.

  • For a specific date ("weather in Tokyo on Friday"), set both start_date and end_date to that date.

  • For a range ("weather in Lisbon next week"), infer the Monday→Sunday range from "next week".

  • If the user gives only a country ("weather in Italy"), ask for a specific city.

RESULT PRESENTATION:

  • For 4+ days, render as a small artifact: one row per day with date, high/low (with unit symbol), condition + a small WMO-driven emoji (☀️ partly cloudy, 🌧️ rain, ⛈️ thunderstorm, ❄️ snow, ☁️ overcast), precip%.

  • For 1-3 days, prose is fine.

  • Always disclose units once at the top ("All temperatures in °C.").

  • If trip planning is in flight, lead with the rainy days the user should plan around.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitsNometric
end_dateNo
latitudeNo
locationNo
longitudeNo
start_dateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations provided, but description fully carries burden: explains data source (Open-Meteo), no API key needed, geocoding via Nominatim, default date behavior, hard 7-day cap, output structure, and rendering rules. No contradictions.

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

Conciseness3/5

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

Description is very long (800+ words) with redundancy between rendering directive and result presentation. However, it uses clear sections and bullet points, so readability is okay but conciseness suffers.

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

Completeness5/5

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

Given the output schema exists, description still thoroughly explains return fields, rendering guidelines, and pre-call behavior. Covers all key aspects for correct tool invocation and result usage.

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

Parameters5/5

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

Schema has 0% description coverage, but description compensates by detailing each parameter (location, lat/lon, start/end dates, units) with defaults, examples, and constraints (e.g., hard cap). Adds significant meaning beyond schema structure.

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?

Clearly states it fetches a 7-day weather forecast for a city or coordinates. Distinct from siblings like search_activities, search_events. Includes specific verb and resource.

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

Usage Guidelines5/5

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

Explicit 'USE THIS TOOL WHEN' section with three clear scenarios (trip planning, date comparison, enriching context). Also has 'PRE-CALL ELICITATION' with date handling defaults, providing strong guidance.

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/nanwer/trip-search-mcp'

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