workflow updated
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: weather-fetcher
|
||||
description: Instructions for fetching current weather temperature data for Dubai, UAE from wttr.in API
|
||||
description: Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API
|
||||
user-invocable: false
|
||||
---
|
||||
|
||||
@@ -14,13 +14,17 @@ Fetch the current temperature for Dubai, UAE in the requested unit (Celsius or F
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Dubai from wttr.in API:
|
||||
- URL: `https://wttr.in/Dubai?format=j1`
|
||||
- This returns JSON format weather data
|
||||
1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Dubai from the Open-Meteo API.
|
||||
|
||||
For **Celsius**:
|
||||
- URL: `https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=celsius`
|
||||
|
||||
For **Fahrenheit**:
|
||||
- URL: `https://api.open-meteo.com/v1/forecast?latitude=25.2048&longitude=55.2708¤t=temperature_2m&temperature_unit=fahrenheit`
|
||||
|
||||
2. **Extract Temperature**: From the JSON response, extract the current temperature:
|
||||
- For Celsius: use `temp_C` from the `current_condition` section
|
||||
- For Fahrenheit: use `temp_F` from the `current_condition` section
|
||||
- Field: `current.temperature_2m`
|
||||
- Unit label is in: `current_units.temperature_2m`
|
||||
|
||||
3. **Return Result**: Return the temperature value and unit clearly.
|
||||
|
||||
@@ -35,6 +39,7 @@ Unit: [Celsius/Fahrenheit]
|
||||
## Notes
|
||||
|
||||
- Only fetch the temperature, do not perform any transformations or write any files
|
||||
- Use wttr.in as it provides reliable, free weather data
|
||||
- Open-Meteo is free, requires no API key, and uses coordinate-based lookups for reliability
|
||||
- Dubai coordinates: latitude 25.2048, longitude 55.2708
|
||||
- Return the numeric temperature value and unit clearly
|
||||
- Support both Celsius and Fahrenheit based on the caller's request
|
||||
|
||||
Reference in New Issue
Block a user