Skip to main content
Glama

Sun and moon times

get_sun_moon_times
Read-onlyIdempotent

Sunrise, sunset, solar noon, civil, nautical and astronomical twilight, golden and blue hour, moonrise, moonset and moon phase for a location, one entry per day. Use it for any question about when the sun or moon rises, sets or gets dark; for the sun's angle at a given moment use get_solar_position, and for tides alongside the sun use get_tide_window. Pass elevation whenever you know it: it shifts sunrise and sunset at altitude. Defaults: from today, 7 days or the plan's limit if lower. Requires an API key on a paid Ephemerides plan.

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": {
      "lat": "<lat>",
      "lon": "<lon>"
    },
    "name": "get_sun_moon_times"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNoIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.
latYesLatitude in decimal degrees.
lonYesLongitude in decimal degrees.
daysNoNumber of days to return. The ceiling is plan-dependent.
elevationNoMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero. For irradiance it is height above sea level. Supply it when known: from a height the sun rises measurably earlier than the sea-level answer. Omit only if it is genuinely unknown.
start_dateNoFirst day as YYYY-MM-DD. Defaults to today.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / elevation / description
      Previous value: -"Metres above sea level. Supply it when known: at altitude the sun rises measurably earlier than the sea-level answer. Omit only if the elevation is genuinely unknown."New value: +"Metres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero. For irradiance it is height above sea level. Supply it when known: from a height the sun rises measurably earlier than the sea-level answer. Omit only if it is genuinely unknown."
  2. Changed1 schema field changed
    • changedInput schema / properties / tz / description
      Previous value: -"IANA timezone for output timestamps, e.g. Europe/Dublin."New value: +"IANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC."
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds value beyond them: an API key requirement tied to a paid Ephemerides plan, a plan-dependent ceiling on result volume, and the one-entry-per-day output shape. It stops short of describing failure modes when the quota is exceeded or how results are ordered, which keeps it off a 5.

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?

Front-loaded with the resource enumeration, then routing, then a parameter caveat, then defaults and auth. Every sentence maps to a distinct decision the caller must make, and the long first clause is a necessary enumeration rather than 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?

For a six-parameter read tool with no output schema, the description covers scope, defaults, routing and the auth prerequisite. The remaining gap is that 'one entry per day' doesn't tell the agent the field names or timestamp format, so it must call once to learn the response shape. That is a minor omission given the otherwise complete picture.

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% and the schema itself already carries unusually rich parameter prose, including most of the elevation nuance. The description's contribution is a usage rule rather than new semantics — 'pass elevation whenever you know it' because it shifts sunrise and sunset at altitude — plus restating the date default. Baseline 3 is right when the schema does nearly all the work.

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-plus-resource set with the exact quantities returned (sunrise, solar noon, three twilight bands, golden/blue hour, moonrise/set/phase) and the granularity (one entry per day). It also names the sibling it is not — get_solar_position — so the agent can separate instant angle queries from daily rise/set tables without opening a 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 trigger ('any question about when the sun or moon rises, sets or gets dark') plus two named alternatives with the condition that selects each: get_solar_position for the sun's angle at a moment, get_tide_window for tides alongside the sun. It also states the default window (today, 7 days, or the plan limit if lower), which is the kind of guidance most definitions omit.

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.