Weather Tool (Environment Canada)
The get_weather tool lets a chat agent answer weather questions with live data for Canadian cities — current conditions and any active weather alerts (warnings, watches, advisories, and special statements), with optional forecast and climate sections.
Data comes from Environment and Climate Change Canada (the MSC GeoMet public API). No API key, account, or extra configuration is required — enabling the tool on an agent is all it takes.
Enabling the Tool
- Open the chat agent for editing and go to the Tools tab
- Check get_weather in the tools list
- Save the agent
Once enabled, the agent will call the tool automatically when a visitor asks about weather, temperature, wind, or storm warnings.
Choosing What the Tool Returns
Below the tools list on the same tab, the Weather Tool section controls which data sections the tool returns to the agent:
| Section |
Contents |
Default |
| Current conditions |
Temperature, condition, wind, humidity, pressure, visibility |
✅ On |
| Warnings & alerts |
Active warnings, watches, advisories, and special statements, with issue time and a link |
✅ On |
| 7-day forecast |
Daily forecast text per period (e.g. "Tonight", "Saturday") |
Off |
| Hourly forecast |
Conditions for the next 12 hours |
Off |
| Sunrise & sunset |
Daily rise and set times |
Off |
| Yesterday's weather |
Yesterday's high, low, and precipitation |
Off |
| Normals & records |
Seasonal normal temperatures and record highs/lows for the date |
Off |
Notes:
- If you never touch the section settings, the tool returns current conditions + warnings & alerts — the defaults.
- Enabling more sections gives the agent more to work with (e.g. "will it rain tomorrow?" needs the 7-day forecast) but makes each tool result larger. Enable what your use case needs.
- If every checkbox is unchecked, the defaults apply.
How the Agent Uses It
- Canadian locations only. The data source covers Environment Canada's city pages. For places outside Canada, the agent is told to say it only has Canadian weather data.
- City names are matched flexibly — case and accents don't matter ("montreal" finds Montréal). When a city name exists in more than one province (e.g. Hamilton), the tool returns the candidates and the agent asks for or infers the province, then retries with "City, Province".
- Small towns without their own city page: the agent is guided to use the nearest larger Canadian city and say so.
- French — the agent can request conditions and warning text in French for French conversations.
- Freshness — observations refresh roughly hourly at the source and results are cached for a few minutes. Each result carries the observation time, and the agent is instructed to mention it when the reading may be stale.
Prompting Tips
The tool's built-in description already teaches the agent the basics, but adding guidance to the agent's instructions helps it match your voice. For example:
When a visitor asks about weather, use the get_weather tool — never answer
from memory. Lead with any active warnings before giving conditions. If
there are no warnings and the visitor asked about them, say clearly that
none are in effect. Only Canadian locations are covered.
Troubleshooting
- "No Environment Canada city page matches…" — the location isn't in the city-page index. Ask for the nearest larger city, or check the spelling.
- The agent doesn't mention the forecast — the 7-day forecast section is off by default; enable it in the Weather Tool section of the agent's Tools tab.
- Weather service timed out — the public Environment Canada API was temporarily unreachable; the agent is told to suggest trying again.