Skip to main content
Glama

Get Sunrise Sunset

get_sunrise_sunset
Read-onlyIdempotent

Fetch sunrise, sunset, solar noon, civil twilight begin/end, and day length (seconds) for a given latitude/longitude on an optional YYYY-MM-DD date (defaults to today) via the Sunrise-Sunset API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (default: today)
latitudeYesLatitude
longitudeYesLongitude

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sunsetYesSunset time in ISO format
sunriseYesSunrise time in ISO format
solar_noonYesSolar noon time in ISO format
civil_twilight_endYesCivil twilight end time in ISO format
day_length_secondsYesTotal daylight duration in seconds
civil_twilight_beginYesCivil twilight start time in ISO format

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "civil_twilight_begin": {
      +      "description": "Civil twilight start time in ISO format",
      +      "type": "string"
      +    },
      +    "civil_twilight_end": {
      +      "description": "Civil twilight end time in ISO format",
      +      "type": "string"
      +    },
      +    "day_length_seconds": {
      +      "description": "Total daylight duration in seconds",
      +      "type": "number"
      +    },
      +    "solar_noon": {
      +      "description": "Solar noon time in ISO format",
      +      "type": "string"
      +    },
      +    "sunrise": {
      +      "description": "Sunrise time in ISO format",
      +      "type": "string"
      +    },
      +    "sunset": {
      +      "description": "Sunset time in ISO format",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "sunrise",
      +    "sunset",
      +    "solar_noon",
      +    "day_length_seconds",
      +    "civil_twilight_begin",
      +    "civil_twilight_end"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "latitude": 40.7128,
      +    "longitude": -74.006
      +  },
      +  {
      +    "date": "2024-06-21",
      +    "latitude": 35.6762,
      +    "longitude": 139.6503
      +  }
      +]
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive hints. The description adds valuable context beyond these: it references the Sunrise-Sunset API as an external dependency and lists the specific fields returned (solar noon, civil twilight, day length). It does not contradict annotations and provides meaningful behavioral details.

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?

The description is a single, well-structured sentence that front-loads the primary action, lists key outputs, and includes input parameters and defaults. Every phrase earns its place with no redundancy or filler.

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?

For a simple read-only tool with a full output schema and comprehensive annotations, the description is complete. It covers inputs, optional parameters, defaults, the external API source, and the expected return fields. No critical information is missing for an agent to decide on and invoke the 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 coverage is 100%, so the baseline is 3. The description reinforces the schema by clarifying that date is optional and defaults to today, but it does not add materially new information about parameter formats or constraints beyond what the schema already provides. The schema descriptions for latitude, longitude, and date are sufficient.

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?

The description uses the specific verb 'Fetch' and clearly identifies the resource: sunrise/sunset data including solar noon, civil twilight, and day length. It also specifies the required inputs (latitude/longitude) and optional date, making it distinct from sibling tools like geocode or get_timezone.

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

Usage Guidelines4/5

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

The description clearly implies when to use this tool: when sunrise/sunset times are needed for a given location and optional date. It states the default behavior (defaults to today) and the API source, but does not explicitly mention alternatives or exclusions. Context is clear, though no 'when not to use' guidance is provided.

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.