Skip to main content
Glama

astronomy-mcp-server: get rise/set times

astronomy_get_rise_set
Read-onlyIdempotent

Compute rise, set, and culmination (transit) times for a body at an observer location, plus the maximum altitude at culmination. For the Sun, also returns the three twilight pairs (civil −6°, nautical −12°, astronomical −18°) so a single call answers "when does the sun set and when is it truly dark." Each pair covers the night after the cycle's set — dusk that evening, dawn the next morning — so the dawn listed beside a sunrise is the following day's; for the dawn before a sunrise, read the previous cycle or start a day earlier. Searches forward from start (default today) and returns the next count cycles (default 1). When the body is already above the horizon at start, the first cycle is the interval in progress: its set is the imminent one and its rise is null, since that rise precedes the search — so a set is never reported earlier than the rise beside it. Circumpolar or never-rises situations are reported as null rise/set fields with an explanatory note rather than an error — the fact is the answer. Default elevation is 0 m; pass an IANA timezone for observer-local times. This server does not geocode — resolve coordinates upstream first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe body to compute rise/set for. Twilight is included only when this is "sun".
countNoNumber of forward rise/set cycles to return. Default 1, max 31.
startNoSearch start as an ISO 8601 UTC string, e.g. "2024-06-21T00:00:00Z". Defaults to now. A value with no zone designator is read as UTC, not the local zone of the server process.
latitudeYesObserver latitude in decimal degrees, north positive.
timezoneNoIANA timezone for localized output, e.g. "America/Los_Angeles". When omitted, output is UTC-only.
elevationNoObserver elevation in meters above sea level. Default 0.
longitudeYesObserver longitude in decimal degrees, east positive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoThe body these rise/set cycles are for, echoed from the request.
errorNoPresent when the call failed. Absent on success.
eventsNoOne entry per rise/set/transit cycle, searching forward from the start time.
totalCountNoNumber of rise/set cycles returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • changedOutput schema / properties / events / items / properties / twilight / description
      Previous value: -"The three twilight pairs. Present only when body is \"sun\"."New value: +"The three twilight pairs, present only when body is \"sun\". Each pair spans one night: dusk is the evening of this cycle's set and dawn is the following morning, so a cycle's dawn falls a day after its rise. The dawn before a given sunrise is in the previous cycle's pair — start the search a day earlier to get it."
    • changedOutput schema / properties / events / items / properties / twilight / properties / astronomical / description
      Previous value: -"Astronomical twilight (Sun at −18°) dawn and dusk — the dark-sky window."New value: +"Astronomical twilight (Sun at −18°): dusk and the following dawn, bounding the dark-sky window."
    • changedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_local / description
      Previous value: -"Dawn in observer-local time, present only when a timezone was supplied."New value: +"Dawn in observer-local time — the morning after the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_utc / description
      Previous value: -"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the morning after the cycle's set, ending the night that begins at the dusk beside it — a day later than the cycle's rise, not the dawn before it."
    • changedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_local / description
      Previous value: -"Dusk in observer-local time, present only when a timezone was supplied."New value: +"Dusk in observer-local time — the evening of the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_utc / description
      Previous value: -"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the evening of the cycle's set."
    • changedOutput schema / properties / events / items / properties / twilight / properties / civil / description
      Previous value: -"Civil twilight (Sun at −6°) dawn and dusk."New value: +"Civil twilight (Sun at −6°): dusk and the following dawn."
    • changedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_local / description
      Previous value: -"Dawn in observer-local time, present only when a timezone was supplied."New value: +"Dawn in observer-local time — the morning after the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_utc / description
      Previous value: -"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the morning after the cycle's set, ending the night that begins at the dusk beside it — a day later than the cycle's rise, not the dawn before it."
    • changedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_local / description
      Previous value: -"Dusk in observer-local time, present only when a timezone was supplied."New value: +"Dusk in observer-local time — the evening of the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_utc / description
      Previous value: -"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the evening of the cycle's set."
    • changedOutput schema / properties / events / items / properties / twilight / properties / nautical / description
      Previous value: -"Nautical twilight (Sun at −12°) dawn and dusk."New value: +"Nautical twilight (Sun at −12°): dusk and the following dawn."
    • changedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_local / description
      Previous value: -"Dawn in observer-local time, present only when a timezone was supplied."New value: +"Dawn in observer-local time — the morning after the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_utc / description
      Previous value: -"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dawn (Sun ascending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the morning after the cycle's set, ending the night that begins at the dusk beside it — a day later than the cycle's rise, not the dawn before it."
    • changedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_local / description
      Previous value: -"Dusk in observer-local time, present only when a timezone was supplied."New value: +"Dusk in observer-local time — the evening of the cycle's set — present only when a timezone was supplied."
    • changedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_utc / description
      Previous value: -"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur."New value: +"Dusk (Sun descending through the depth) in ISO 8601 UTC, or null if it does not occur. This is the evening of the cycle's set."
  2. Changed32 schema fields changed
    • removedOutput schema / properties / events / items / properties / rise_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / rise_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / set_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / set_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / transit_altitude_degrees / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / transit_altitude_degrees / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / transit_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / transit_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dawn_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / astronomical / properties / dusk_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dawn_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / civil / properties / dusk_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dawn_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_local / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_local / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_utc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / events / items / properties / twilight / properties / nautical / properties / dusk_utc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "body",
      +      "events",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `invalid_time`: The `start` value is not a parseable ISO 8601 instant, or names a calendar date that does not exist (e.g. 2026-02-30). `time_out_of_range`: The requested start instant is outside the engine's high-accuracy span (≈1900–2100). `invalid_timezone`: The `timezone` value is not an IANA zone this runtime knows. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_time",
      +            "time_out_of_range",
      +            "invalid_timezone"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "body",
      -  "events",
      -  "totalCount"
      -]
  4. Changed2 schema fields changed
    • changedInput schema / properties / start / description
      Previous value: -"Search start as an ISO 8601 UTC string, e.g. \"2024-06-21T00:00:00Z\". Defaults to now."New value: +"Search start as an ISO 8601 UTC string, e.g. \"2024-06-21T00:00:00Z\". Defaults to now. A value with no zone designator is read as UTC, not the local zone of the server process."
    • changedOutput schema / properties / events / items / properties / rise_utc / description
      Previous value: -"Rise time in ISO 8601 UTC, or null when the body does not rise in this cycle (e.g. circumpolar)."New value: +"Rise time in ISO 8601 UTC, or null when the body does not rise in this cycle — because it is circumpolar, or because it was already above the horizon at the search start, whose rise precedes the search. The accompanying note says which."
  5. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish read-only and idempotent behavior; the description adds substantial behavior beyond that: forward search from `start`, cycle semantics when the body is already above the horizon (null rise with imminent set), circumpolar cases returning explanatory notes instead of errors, and the twilight-pair date meaning (dusk same evening, dawn next day). No contradiction with annotations.

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 long but every clause earns its place: edge cases, defaults, twilight semantics, and the geocoding limitation are all consequential for a correct call. The primary purpose is front-loaded in the first sentence, and the rest flows logically from output content to search behavior to fallback handling.

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 7-parameter tool with an output schema already present, the description covers all non-obvious invocation concerns: search direction, in-progress cycles, circumpolar behavior, timezone output, elevation defaults, and coordinate resolution. Nothing needed to call the tool correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema documents each field's type and default. The description still adds value by tying `start` and `count` together ('Searches forward from `start`... returns the next `count` cycles') and clarifying twilight appears only for `body: "sun"`. These are semantic clarifications beyond the schema's per-field descriptions.

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: 'Compute rise, set, and culmination (transit) times for a body at an observer location,' making the tool's function unmistakable. It does not explicitly contrast with siblings like astronomy_get_ephemeris or astronomy_get_sky_position, so it stops short of full differentiation, but the purpose is clear enough from name and content.

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 gives clear context on when the tool applies (rise/set/culmination queries, including twilight for the Sun) and states a prerequisite: 'This server does not geocode — resolve coordinates upstream first.' It does not explicitly name alternatives or when-not-to-use conditions compared to sibling tools, so it misses the top bar for explicit routing.

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.