Skip to main content
Glama

Astro Agents - research-grade astronomical data API

Rise, set and twilight times for a place

rise_set_times
Read-onlyIdempotent

Sunrise, sunset, moonrise, moonset and twilight times for a place and date: rise, transit and set of the Sun, Moon and planets, civil/nautical/astronomical dawn and dusk, day length, golden hour and blue hour, in UTC and local time. E.g. {date: '2026-06-21', latitude: 48.8566, longitude: 2.3522}. For sky, weather, photography and outdoor apps: for one local calendar day at a place (time zone and DST resolved from the coordinates), each body's rise and set (with azimuth) and upper transit (with altitude), or 'always_up' / 'always_down' when it neither rises nor sets (polar day and night); for the Sun, dawn and dusk at -6, -12 and -18 degrees, solar noon, day length, and the golden hour (Sun between -4 and +6 degrees) and blue hour (-6 to -4) intervals. Times in UTC to the second, local time with its offset, and unix timestamps; every convention (refraction, limb, horizon) is in result.settings. Deterministic (JPL DE440, no LLM); every result carries meta.result_sha256. Price $0.01 per call via REST POST https://astro-agent.dev/v1/astronomy/rise-set (x402 or MPP); each client gets 1 free call on the $0.01-0.02 tools, this one included.

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": {
      "date": "<date>",
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    },
    "name": "rise_set_times"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesThe local calendar day at the place, YYYY-MM-DD (1800-01-02..2199-12-30), midnight to midnight in its time zone.
bodiesNoBodies to time. Default: all ten (Sun, Moon, Mercury..Pluto). The Sun's twilight block is always returned.
latitudeYesDecimal degrees, north positive.
timezoneNoIANA zone for local times, e.g. 'Europe/Paris'. Optional: resolved from the coordinates (with its historical DST rules).
longitudeYesDecimal degrees, east positive.
elevation_mNoHeight above the WGS84 ellipsoid, metres (no terrain or horizon dip is modelled).

Output Schema

NameRequiredDescriptionDefault
metaNoProvenance of the result.
errorNox402 offer only: why payment is required.
resultNoThe calculation result.
acceptsNox402 offer only: the payment options (scheme, network, amount, asset, payTo, ...).
endpointNoThe REST route that computed it, e.g. 'astronomy/rise-set'.
resourceNox402 offer only: the resource being paid for.
extensionsNox402 offer only: protocol extensions (bazaar).
x402VersionNox402 offer only: protocol version (2).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / endpoint / description
      Previous value: -"The REST route that computed it, e.g. 'western/natal'."New value: +"The REST route that computed it, e.g. 'astronomy/rise-set'."
  2. Added

TDQS

A4.2/5.0
Behavior5/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, and the description goes well beyond them: determinism from JPL DE440, a per-result meta.result_sha256 for verification, conventions documented in result.settings, polar 'always_up'/'always_down' handling, and time zone/DST resolution from coordinates. It also discloses cost and transport ($0.01 per call, REST POST, x402/MPP, one free call), which an agent needs before invoking a paid endpoint.

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

Conciseness3/5

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

The purpose is front-loaded and the middle section is informative, but the final sentences pile on pricing, URL, payment protocols, free-call policy and hash provenance in one dense block. Useful as a caveat, yet it inflates a already long single paragraph and blurs the core 'what/when' message.

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-only computation with an output schema present, the definition covers the important edges: date range, polar degeneracy, twilight angle conventions, time zone resolution and unit conventions. What is missing is only guidance relative to sibling timing tools, which is a modest gap rather than an incompleteness about this tool itself.

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 six parameters are already documented, and the description's only parameter-level additions are an example payload and the note that timezone defaults to coordinate resolution. That is a small increment over the schema; the bodies list and elevation caveats live in the schema, not the prose. 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 and resource set: sunrise, sunset, moonrise, moonset, twilight, plus rise/transit/set for Sun, Moon and planets for a place and date. The scope is narrow enough ('one local calendar day at a place') that an agent can distinguish it from siblings like body_positions, day_summary or observation_windows 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 Guidelines4/5

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

Gives clear usage context ('For sky, weather, photography and outdoor apps: for one local calendar day at a place') plus the implicit constraint that it is a one-day, one-place query. It does not name any sibling alternative or state when NOT to use it (e.g. multi-day series vs. longitude_series or day_summary), so it stops short of full routing guidance.

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.