Skip to main content
Glama

Astro Agents - research-grade astronomical data API

Observation windows for a night

observation_windows
Read-onlyIdempotent

Which planets and the Moon can be observed tonight from a place, and when: windows above a minimum altitude while the sky is dark, with the best time, altitude, azimuth and magnitude. E.g. {date: '2026-06-21', latitude: 48.8566, longitude: 2.3522}. For observation planning: over the night that starts on 'date' (local noon to noon), the intervals when each body stands at least min_altitude_deg above the horizon while the Sun is at or below sun_altitude_max_deg (default -6: after civil dusk), each with start, end, duration and the best moment (highest altitude) with its azimuth and visual magnitude; plus the dark interval itself. Deterministic (JPL DE440, no LLM); every result carries meta.result_sha256. Price $0.02 per call via REST POST https://astro-agent.dev/v1/astronomy/visibility (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": "observation_windows"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesThe evening that starts the observing night, YYYY-MM-DD: the night runs from local noon on that date to local noon the next day.
bodiesNoBodies to plan. Default: the Moon and Mercury..Neptune.
optionsNoWhat counts as observable.
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.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description still adds substantial behavior beyond them: deterministic computation (JPL DE440, no LLM), a verifiable meta.result_sha256 on every result, REST endpoint, pricing model ($0.02/call via MPP or x402) and one free call. Cost and authentication mechanics are exactly the kind of context an agent needs before invoking a paid endpoint and are not in the annotations.

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 opening sentence is well front-loaded and immediately actionable, but the middle section restates the return contents twice ('best time, altitude, azimuth and magnitude' then again 'start, end, duration and the best moment... azimuth and visual magnitude'), and the pricing/endpoint tail is long. Information density is decent but there is clear duplication of return-value detail that an output schema already covers.

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 nested options and rich annotations, nothing an agent needs to call it correctly is missing: night boundary definition, dark-sky threshold semantics, body defaults, determinism guarantees and cost. The output schema exists, so the description's recap of return fields is surplus rather than a gap.

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 every parameter including the nested options (min_altitude_deg, sun_altitude_max_deg) and the bodies enum is already documented in structured form. The description restates the -6/civil-dusk default and illustrates a sample payload, but adds no syntax or constraint detail the schema lacks, so 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?

Names a specific verb-and-resource pair ('which planets and the Moon can be observed tonight... and when') and pins down the output shape: altitude-filtered visibility windows while the sky is dark, with best time, altitude, azimuth and magnitude. That is clearly distinct from sibling tools like rise_set_times (horizon crossings), sky_now (instantaneous state) or day_summary, so an agent can route 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?

Explicitly frames the use case ('For observation planning') and defines the temporal scope of the query ('the night that starts on date, local noon to noon'), which is the key thing an agent needs to pick this over an instantaneous tool. It stops short of naming a specific sibling alternative or a when-not condition, so it sits at clear-context rather than 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.