Skip to main content
Glama

Sunrise & sunset times for a date range

get_sun_times_range
Read-only

Same per-day data as get_sun_times but for an inclusive date range (up to 366 days) in a single call. Use this instead of repeated get_sun_times calls when you need several consecutive days. The days array may contain fewer entries than the number of dates requested: calendar days that never existed in that timezone (Samoa skipped 30 December 2011 when it crossed the date line) are left out, so read each entry's date field instead of assuming one per requested date.

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.
date_endYesLast day (inclusive), YYYY-MM-DD. The range covers at most 366 days counting both ends, so date_end can be at most 365 days after date_start.
date_startYesFirst day, YYYY-MM-DD.

Output Schema

NameRequiredDescriptionDefault
latYes
lngYes
daysYesOne entry per local day that exists in that timezone, in order; match entries by their date field.
tzidYesIANA timezone used.
attributionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attribution": {
      +      "type": "string"
      +    },
      +    "days": {
      +      "description": "One entry per local day that exists in that timezone, in order; match entries by their date field.",
      +      "items": {
      +        "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"
      +            ]
      +          },
      +          "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"
      +            ]
      +          },
      +          "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"
      +            ]
      +          },
      +          "utc_offset": {
      +            "description": "UTC offset of the location at local noon, like +02:00.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "date",
      +          "utc_offset",
      +          "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"
      +      },
      +      "type": "array"
      +    },
      +    "lat": {
      +      "type": "number"
      +    },
      +    "lng": {
      +      "type": "number"
      +    },
      +    "tzid": {
      +      "description": "IANA timezone used.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tzid",
      +    "lat",
      +    "lng",
      +    "days"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint=false, but the description adds genuinely non-obvious behavior: the days array may be shorter than the requested range because non-existent calendar days (Samoa, 30 Dec 2011) are omitted, and callers must read each entry's date field rather than assuming a 1:1 mapping.

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

Conciseness5/5

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

Three sentences, each earning its place: the first establishes scope and the sibling comparison, the second gives the usage rule, the third delivers the critical edge case. The routing rule is front-loaded before the caveat.

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

Completeness5/5

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

An output schema exists, so return values need no explanation. Combined with full schema coverage and annotations, the description supplies everything an agent needs — including the non-obvious short-array behavior — to call and interpret this tool correctly.

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 all five parameters (tz, lat, lng, date_start, date_end) are already documented, including the 366-day cap. The description restates the inclusive-range and 366-day constraint but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb+resource ('Same per-day data as get_sun_times but for an inclusive date range') and immediately scopes it against its only sibling. An agent can distinguish it from get_sun_times without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule: 'Use this instead of repeated get_sun_times calls when you need several consecutive days.' The alternative and the selecting condition are both named, leaving nothing to inference.

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.