Sunrise, sunset and hours of sun
sun_timesSunrise, solar noon, sunset and day length on a date for a flat horizon; with terrain=True, also the hours of direct sun once hills are taken into account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"latitude": "<latitude>",
"longitude": "<longitude>",
"date": "<date>"
},
"name": "sun_times"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | IANA time zone, e.g. Australia/Melbourne; default UTC | |
| date | Yes | Local date, YYYY-MM-DD | |
| terrain | No | Also count hours of direct sun above the terrain horizon (reads the DEM; ~10-60 s) | |
| latitude | Yes | Latitude in degrees (WGS84) | |
| longitude | Yes | Longitude in degrees (WGS84) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| units | No | Unit of each numeric field | |
| method | Yes | ||
| status | No | ok | |
| sunset | Yes | ||
| sunrise | Yes | ||
| warnings | No | Caveats to tell the user | |
| time_zone | Yes | ||
| provenance | No | Source, licence, attribution, retrieval time and method | |
| solar_noon | Yes | ||
| day_length_h | Yes | ||
| terrain_hours | No | Hours of direct sun above the terrain horizon | |
| last_direct_sun | No | ||
| first_direct_sun | No | ||
| solar_noon_elevation_deg | Yes |