Skip to main content
Glama

astronomy-mcp-server: get sky position

astronomy_get_sky_position
Read-onlyIdempotent

Compute the apparent topocentric position of one solar-system body (sun, moon, mercury through neptune, pluto) or a named bright star for an observer location and instant. Returns equatorial (RA/Dec), refraction-corrected horizontal (altitude/azimuth), and ecliptic coordinates, plus distance, apparent magnitude, angular diameter, phase angle, illuminated fraction, angular distance from the Sun, and the constellation it falls in. For a solar-system body it also returns that body card — classification, mean radius, naked-eye visibility — the same values served at astronomy://body/{body}, so a client without resource support does not need a second surface to reach them; a catalog star has no card and the field is absent. Positions are parallax- and aberration-corrected for the given observer; default elevation is 0 m and the default time is now. Supply star (e.g. "Sirius", "Polaris") instead of body to target a catalog star; body is ignored when star is set. Pass an IANA timezone to also receive the observer-local time. This server does not geocode — resolve a place name to latitude/longitude upstream first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoSolar-system body to locate. Omit when targeting a named star via `star`.
starNoNamed star to locate, from a bundled catalog of 32 stars — about 30 of the brightest naked-eye stars plus Polaris, not an arbitrary star. Accepts a common name or Bayer designation, with the Greek letter spelled out or as a symbol and the constellation as its genitive or IAU abbreviation (e.g. "Sirius", "Alpha Centauri", "α CMa"). A name outside the catalog fails with the full list of catalog stars. Takes precedence over `body`.
timeNoInstant of observation as an ISO 8601 UTC string, e.g. "2024-04-08T18: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 or star this position is for, echoed from the request.
errorNoPresent when the call failed. Absent on success.
eclipticNoEcliptic-of-date coordinates of the body.
time_utcNoThe instant of the observation in ISO 8601 UTC.
magnitudeNoApparent visual magnitude (lower is brighter). Null for bodies where the engine cannot compute it.
equatorialNoApparent equatorial coordinates, corrected for precession, nutation, parallax, and aberration.
horizontalNoRefraction-corrected horizontal coordinates as seen from the observer.
time_localNoThe same instant in the observer-local timezone with offset, present only when a timezone was supplied.
body_metadataNoThe body card also served at astronomy://body/{body}, copied here so a client without resource support can reach it. Present for the ten solar-system bodies; absent for a catalog star, which has no card.
constellationNoThe constellation the body currently falls within.
phase_angle_degreesNoSun-body-observer phase angle in degrees. Null when not applicable (e.g. stars).
illuminated_fractionNoFraction of the disc illuminated, 0 to 1. Null when not applicable.
sun_elongation_degreesNoAngular distance from the Sun in degrees [0,180], seen from Earth's center. A body within about 15° of the Sun is lost in its glare. 0 for the Sun itself.
angular_diameter_arcsecNoApparent angular diameter of the disc in arcseconds. Null for point-source convention bodies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / star / description
      Previous value: -"Named bright star to locate (common name or Bayer designation, e.g. \"Sirius\", \"Alpha Centauri\"). Takes precedence over `body`."New value: +"Named star to locate, from a bundled catalog of 32 stars — about 30 of the brightest naked-eye stars plus Polaris, not an arbitrary star. Accepts a common name or Bayer designation, with the Greek letter spelled out or as a symbol and the constellation as its genitive or IAU abbreviation (e.g. \"Sirius\", \"Alpha Centauri\", \"α CMa\"). A name outside the catalog fails with the full list of catalog stars. Takes precedence over `body`."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "body",
      -      "time_utc",
      -      "equatorial",
      -      "horizontal",
      -      "ecliptic",
      -      "magnitude",
      -      "angular_diameter_arcsec",
      -      "phase_angle_degrees",
      -      "illuminated_fraction",
      -      "constellation"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "body",
      +      "time_utc",
      +      "equatorial",
      +      "horizontal",
      +      "ecliptic",
      +      "magnitude",
      +      "angular_diameter_arcsec",
      +      "phase_angle_degrees",
      +      "illuminated_fraction",
      +      "sun_elongation_degrees",
      +      "constellation"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_time`: The `time` 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 instant is outside the engine's high-accuracy span (≈1900–2100). `invalid_timezone`: The `timezone` value is not an IANA zone this runtime knows. `star_not_found`: The `star` name is not present in the bundled bright-star catalog. `body_required`: Neither a `body` nor a `star` was supplied. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_time`: The `time` 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 instant is outside the engine's high-accuracy span (≈1900–2100). `invalid_timezone`: The `timezone` value is not an IANA zone this runtime knows. `star_not_found`: The `star` name is not present in the bundled bright-star catalog. The error lists every catalog star, in the message and as `catalog_stars`. `body_required`: Neither a `body` nor a `star` was supplied. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / sun_elongation_degrees
      Added value: +{
      +  "description": "Angular distance from the Sun in degrees [0,180], seen from Earth's center. A body within about 15° of the Sun is lost in its glare. 0 for the Sun itself.",
      +  "type": "number"
      +}
  2. Changed8 schema fields changed
    • removedOutput schema / properties / angular_diameter_arcsec / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / angular_diameter_arcsec / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / illuminated_fraction / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / illuminated_fraction / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / magnitude / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / magnitude / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / phase_angle_degrees / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / phase_angle_degrees / type
      Added value: +[
      +  "number",
      +  "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",
      +      "time_utc",
      +      "equatorial",
      +      "horizontal",
      +      "ecliptic",
      +      "magnitude",
      +      "angular_diameter_arcsec",
      +      "phase_angle_degrees",
      +      "illuminated_fraction",
      +      "constellation"
      +    ]
      +  },
      +  {
      +    "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 `time` 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 instant is outside the engine's high-accuracy span (≈1900–2100). `invalid_timezone`: The `timezone` value is not an IANA zone this runtime knows. `star_not_found`: The `star` name is not present in the bundled bright-star catalog. `body_required`: Neither a `body` nor a `star` was supplied. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_time",
      +            "time_out_of_range",
      +            "invalid_timezone",
      +            "star_not_found",
      +            "body_required"
      +          ],
      +          "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",
      -  "time_utc",
      -  "equatorial",
      -  "horizontal",
      -  "ecliptic",
      -  "magnitude",
      -  "angular_diameter_arcsec",
      -  "phase_angle_degrees",
      -  "illuminated_fraction",
      -  "constellation"
      -]
  4. Changed2 schema fields changed
    • changedInput schema / properties / time / description
      Previous value: -"Instant of observation as an ISO 8601 UTC string, e.g. \"2024-04-08T18:00:00Z\". Defaults to now."New value: +"Instant of observation as an ISO 8601 UTC string, e.g. \"2024-04-08T18:00:00Z\". Defaults to now. A value with no zone designator is read as UTC, not the local zone of the server process."
    • addedOutput schema / properties / body_metadata
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The body card also served at astronomy://body/{body}, copied here so a client without resource support can reach it. Present for the ten solar-system bodies; absent for a catalog star, which has no card.",
      +  "properties": {
      +    "mean_radius_km": {
      +      "description": "Mean radius in kilometers, from IAU/NASA fact sheets.",
      +      "type": "number"
      +    },
      +    "naked_eye": {
      +      "description": "True when the body is typically visible to the naked eye.",
      +      "type": "boolean"
      +    },
      +    "type": {
      +      "description": "Classification of the body.",
      +      "enum": [
      +        "star",
      +        "planet",
      +        "moon",
      +        "dwarf"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type",
      +    "mean_radius_km",
      +    "naked_eye"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, but the description adds substantial behavioral context: positions are parallax- and aberration-corrected, default elevation is 0 m, default time is now, `body` is ignored when `star` is set, timezone affects output local time, catalog stars produce no body card, and invalid star names fail with a full list. These details go well beyond the structured annotations and are consistent with them.

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

Conciseness4/5

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

The description is long but warranted for a 7-parameter tool with many outputs. It is front-loaded with the core purpose, then output details, then defaults and precedence, and ends with a practical geocoding note. Each sentence carries necessary information; the length is justified by complexity, but it is not as tight as a two-sentence minimal description.

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?

Given that an output schema exists, the description does not need to document return shapes, but it still lists all returned quantities (including body-card details). It covers defaults, star/body precedence, timezone behavior, catalog constraints, and the no-geocoding limitation. For a tool of this complexity, there are no obvious gaps an agent would need to call it correctly.

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 baseline is 3. The description adds meaningful interplay between `body` and `star` (precedence), explains the effect of `timezone` on output, and clarifies that latitude/longitude must be pre-resolved (no geocoding). This extra semantics raises it above baseline, though it does not radically rewrite parameter meanings.

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 opens with a specific verb and resource: 'Compute the apparent topocentric position of one solar-system body ... or a named bright star for an observer location and instant.' It enumerates the exact output quantities (RA/Dec, horizontal, ecliptic, distance, magnitude, etc.) and scopes the tool to a single body or star at a single instant. This clearly distinguishes it from siblings like astronomy_get_ephemeris (time series) or astronomy_get_moon_phase (only lunar phase).

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: this tool targets a single body/star for one observer location and instant, and it explicitly tells users to geocode upstream ('This server does not geocode — resolve a place name to latitude/longitude upstream first.'). It also explains the star-vs-body precedence. However, it never names sibling tools or states when to prefer one of them, so it falls short of full explicit when/when-not 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.