You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure where to ask this question, but here goes.
I'm trying to understand this tutorial, but I can't figure out how Claude gets the coordinates for a city to get the forecast?
Are those part of default resources that the model has access to?
But if I ask, through the client, "What is the weather forecast for
Miami?", Claude seems to get the coordinates by itself to send them to the
tool.
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada
In this case Claude detects the 2-letter state code (e.g. CA, NY) and passes it to the get_alerts(state: str) tool, which in turn calls the https://api.weather.gov/alerts/active/area/{state} url (e.g. https://api.weather.gov/alerts/active/area/MI)
Activity
bdtranter commentedon Aug 7, 2025
You provide the coordinates in the query.
patrickleboutillier commentedon Aug 7, 2025
a-akimov commentedon Apr 1, 2026
In this case Claude detects the 2-letter state code (e.g. CA, NY) and passes it to the
get_alerts(state: str)tool, which in turn calls thehttps://api.weather.gov/alerts/active/area/{state}url (e.g. https://api.weather.gov/alerts/active/area/MI)