Skip to main content
Glama

Sunrise & sunset times

get_sun_times
Read-only

Sunrise, sunset, solar noon, day length, civil/nautical/astronomical twilight, dawn/dusk, first/last light, golden hour, blue hour, sunrise/sunset azimuth, solar noon altitude, moonrise/moonset, moon phase and illumination for any coordinates on Earth and any date. Times are ISO 8601 in the local timezone of the location. Polar day/night handled via sun_status (normal | midnight_sun | polar_night); events that do not occur are null.

Input Schema

NameRequiredDescriptionDefault
tzNoIANA timezone like 'Europe/Madrid'. Omit to use the local timezone of the coordinates, resolved automatically (recommended).
latYesLatitude in decimal degrees.
lngYesLongitude in decimal degrees.
dateNo'today' (default), 'tomorrow' or YYYY-MM-DD. Relative dates resolve in the local timezone of the coordinates.

Output Schema

NameRequiredDescriptionDefault
latYes
lngYes
dateYesLocal date, YYYY-MM-DD.
dawnYesDawn (start of civil twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
duskYesDusk (end of civil twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
tzidYesIANA timezone used.
sunsetYesSunset, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
moonsetYesMoonset, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
sunriseYesSunrise, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
moonriseYesMoonrise, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
blue_hourYes
day_lengthYesSeconds of daylight: 86400 with midnight sun, 0 with polar night, null on a day with only one of sunrise/sunset.
last_lightYesLast light (end of astronomical twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
moon_phaseYesMoon phase at local noon.
solar_noonYesSolar noon, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
sun_statusYes
utc_offsetYesUTC offset of the location at local noon, like +02:00.
attributionNo
first_lightYesFirst light (start of astronomical twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
golden_hourYes
solar_positionYes
moon_illuminationYesIlluminated fraction of the moon at local noon, in percent (0-100).
civil_twilight_endYesEnd of civil twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
civil_twilight_beginYesStart of civil twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
nautical_twilight_endYesEnd of nautical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
nautical_twilight_beginYesStart of nautical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
astronomical_twilight_endYesEnd of astronomical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.
astronomical_twilight_beginYesStart of astronomical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changed
    • changedOutput schema / properties / astronomical_twilight_begin / description
      Previous value: -"Start of astronomical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of astronomical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / astronomical_twilight_end / description
      Previous value: -"End of astronomical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of astronomical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / blue_hour / properties / evening / properties / begin / description
      Previous value: -"Start of the evening blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of the evening blue hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / blue_hour / properties / evening / properties / end / description
      Previous value: -"End of the evening blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of the evening blue hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / blue_hour / properties / morning / properties / begin / description
      Previous value: -"Start of the morning blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of the morning blue hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / blue_hour / properties / morning / properties / end / description
      Previous value: -"End of the morning blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of the morning blue hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / civil_twilight_begin / description
      Previous value: -"Start of civil twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of civil twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / civil_twilight_end / description
      Previous value: -"End of civil twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of civil twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / dawn / description
      Previous value: -"Dawn (start of civil twilight), ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Dawn (start of civil twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / dusk / description
      Previous value: -"Dusk (end of civil twilight), ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Dusk (end of civil twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / first_light / description
      Previous value: -"First light (start of astronomical twilight), ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"First light (start of astronomical twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / golden_hour / properties / evening / properties / begin / description
      Previous value: -"Start of the evening golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of the evening golden hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / golden_hour / properties / evening / properties / end / description
      Previous value: -"End of the evening golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of the evening golden hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / golden_hour / properties / morning / properties / begin / description
      Previous value: -"Start of the morning golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of the morning golden hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / golden_hour / properties / morning / properties / end / description
      Previous value: -"End of the morning golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of the morning golden hour, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / last_light / description
      Previous value: -"Last light (end of astronomical twilight), ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Last light (end of astronomical twilight), ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / moonrise / description
      Previous value: -"Moonrise, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Moonrise, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / moonset / description
      Previous value: -"Moonset, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Moonset, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / nautical_twilight_begin / description
      Previous value: -"Start of nautical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Start of nautical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / nautical_twilight_end / description
      Previous value: -"End of nautical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"End of nautical twilight, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / solar_noon / description
      Previous value: -"Solar noon, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Solar noon, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / sunrise / description
      Previous value: -"Sunrise, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Sunrise, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
    • changedOutput schema / properties / sunset / description
      Previous value: -"Sunset, ISO 8601 with the local UTC offset; null if it does not happen that day."New value: +"Sunset, ISO 8601 with the local UTC offset (the next date if that evening's event comes after local midnight); null if it does not happen that day."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "astronomical_twilight_begin": {
      +      "description": "Start of astronomical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "astronomical_twilight_end": {
      +      "description": "End of astronomical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "attribution": {
      +      "type": "string"
      +    },
      +    "blue_hour": {
      +      "properties": {
      +        "evening": {
      +          "properties": {
      +            "begin": {
      +              "description": "Start of the evening blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "end": {
      +              "description": "End of the evening blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "begin",
      +            "end"
      +          ],
      +          "type": "object"
      +        },
      +        "morning": {
      +          "properties": {
      +            "begin": {
      +              "description": "Start of the morning blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "end": {
      +              "description": "End of the morning blue hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "begin",
      +            "end"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "morning",
      +        "evening"
      +      ],
      +      "type": "object"
      +    },
      +    "civil_twilight_begin": {
      +      "description": "Start of civil twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "civil_twilight_end": {
      +      "description": "End of civil twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "date": {
      +      "description": "Local date, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "dawn": {
      +      "description": "Dawn (start of civil twilight), ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "day_length": {
      +      "description": "Seconds of daylight: 86400 with midnight sun, 0 with polar night, null on a day with only one of sunrise/sunset.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "dusk": {
      +      "description": "Dusk (end of civil twilight), ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "first_light": {
      +      "description": "First light (start of astronomical twilight), ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "golden_hour": {
      +      "properties": {
      +        "evening": {
      +          "properties": {
      +            "begin": {
      +              "description": "Start of the evening golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "end": {
      +              "description": "End of the evening golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "begin",
      +            "end"
      +          ],
      +          "type": "object"
      +        },
      +        "morning": {
      +          "properties": {
      +            "begin": {
      +              "description": "Start of the morning golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "end": {
      +              "description": "End of the morning golden hour, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "begin",
      +            "end"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "morning",
      +        "evening"
      +      ],
      +      "type": "object"
      +    },
      +    "last_light": {
      +      "description": "Last light (end of astronomical twilight), ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "lat": {
      +      "type": "number"
      +    },
      +    "lng": {
      +      "type": "number"
      +    },
      +    "moon_illumination": {
      +      "description": "Illuminated fraction of the moon at local noon, in percent (0-100).",
      +      "type": "number"
      +    },
      +    "moon_phase": {
      +      "description": "Moon phase at local noon.",
      +      "enum": [
      +        "New Moon",
      +        "Waxing Crescent",
      +        "First Quarter",
      +        "Waxing Gibbous",
      +        "Full Moon",
      +        "Waning Gibbous",
      +        "Last Quarter",
      +        "Waning Crescent"
      +      ],
      +      "type": "string"
      +    },
      +    "moonrise": {
      +      "description": "Moonrise, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "moonset": {
      +      "description": "Moonset, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "nautical_twilight_begin": {
      +      "description": "Start of nautical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "nautical_twilight_end": {
      +      "description": "End of nautical twilight, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "solar_noon": {
      +      "description": "Solar noon, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "solar_position": {
      +      "properties": {
      +        "solar_noon_altitude": {
      +          "description": "Altitude of the sun at solar noon in degrees; null if the event does not happen.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "solar_noon_azimuth": {
      +          "description": "Azimuth of the sun at solar noon in degrees; null if the event does not happen.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "sunrise_azimuth": {
      +          "description": "Azimuth of the sun at sunrise in degrees; null if the event does not happen.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "sunset_azimuth": {
      +          "description": "Azimuth of the sun at sunset in degrees; null if the event does not happen.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "sunrise_azimuth",
      +        "sunset_azimuth",
      +        "solar_noon_azimuth",
      +        "solar_noon_altitude"
      +      ],
      +      "type": "object"
      +    },
      +    "sun_status": {
      +      "enum": [
      +        "normal",
      +        "midnight_sun",
      +        "polar_night"
      +      ],
      +      "type": "string"
      +    },
      +    "sunrise": {
      +      "description": "Sunrise, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sunset": {
      +      "description": "Sunset, ISO 8601 with the local UTC offset; null if it does not happen that day.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "tzid": {
      +      "description": "IANA timezone used.",
      +      "type": "string"
      +    },
      +    "utc_offset": {
      +      "description": "UTC offset of the location at local noon, like +02:00.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "date",
      +    "tzid",
      +    "utc_offset",
      +    "lat",
      +    "lng",
      +    "sunrise",
      +    "sunset",
      +    "solar_noon",
      +    "day_length",
      +    "sun_status",
      +    "civil_twilight_begin",
      +    "civil_twilight_end",
      +    "nautical_twilight_begin",
      +    "nautical_twilight_end",
      +    "astronomical_twilight_begin",
      +    "astronomical_twilight_end",
      +    "dawn",
      +    "dusk",
      +    "first_light",
      +    "last_light",
      +    "golden_hour",
      +    "blue_hour",
      +    "solar_position",
      +    "moonrise",
      +    "moonset",
      +    "moon_phase",
      +    "moon_illumination"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint and openWorldHint=false, so safety needs no elaboration. The description goes beyond that with genuinely useful behavior: times are returned as ISO 8601 in the location's local timezone, and polar day/night are surfaced via sun_status rather than silently dropped. Explicitly noting that non-occurring events come back as null is exactly the kind of edge-case disclosure that prevents downstream parsing errors.

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

Conciseness4/5

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

The opening sentence is a dense but well-ordered enumeration of returned quantities, front-loaded before the caveats. The timezone and polar-day/night sentences follow logically and each earns its place. It is long, but the length comes from enumerating return values rather than from filler.

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

Completeness4/5

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

The complexities of this tool are polar edge cases and timezone resolution, and both are addressed, with output schema available for the rest of the return shape. One gap remains: absolute altitude or range limitations and any rate limits are unstated, though those are minor for a read-only lookup.

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

Parameters3/5

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

Schema description coverage is 100%, so lat, lng, tz, and date are already fully documented, including the recommended tz omission behavior and relative date resolution. The description adds no per-parameter syntax or defaults beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb-and-resource list ('Sunrise, sunset, solar noon, day length...'), so the agent knows immediately that this is a solar/lunar ephemeris lookup for a point and a date. It never names the sibling get_sun_times_range or explains how the single-day tool differs from the range tool, which is the one differentiating detail missing.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'for any coordinates on Earth and any date', which signals this is the single-date query. There is no explicit when-to-use or when-not-to-use statement, and no mention of when the agent should prefer get_sun_times_range for multi-day queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.