Skip to main content
Glama

astronomy-mcp-server: get moon phase

astronomy_get_moon_phase
Read-onlyIdempotent

Report the Moon phase for an instant: illuminated fraction, phase name, synodic age in days since the new moon, phase longitude (the Moon–Sun ecliptic-longitude difference, 180° at full), and the next four quarter phases (new, first quarter, full, last quarter) with timestamps. Answers "what is the moon phase tonight" and "when is the next full moon" in one call without iteration. The time defaults to now; pass an IANA timezone to also receive observer-local timestamps. The phase is geocentric — no observer location is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeNoInstant to evaluate as an ISO 8601 UTC string, e.g. "2024-12-15T00:00:00Z". Defaults to now. A value with no zone designator is read as UTC, not the local zone of the server process.
timezoneNoIANA timezone for localized output, e.g. "America/Los_Angeles". When omitted, output is UTC-only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
age_daysNoSynodic age in days since the previous new moon.
time_utcNoThe instant the phase was computed for, in ISO 8601 UTC.
phase_nameNoHuman-readable phase name (New Moon, Waxing Crescent, First Quarter, …, Waning Crescent).
time_localNoThe same instant in the observer-local timezone with offset, present only when a timezone was supplied.
next_quartersNoThe next four lunar quarter phases (new/first/full/last) in chronological order.
illuminated_fractionNoFraction of the lunar disc illuminated, 0 to 1.
phase_longitude_degreesNoThe Moon's ecliptic longitude minus the Sun's, in degrees [0,360): 0 = new, 90 = first quarter, 180 = full, 270 = last quarter. Not the Sun–body–observer phase angle astronomy_get_sky_position reports as phase_angle_degrees, which reads 0 at full moon.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "time_utc",
      -      "phase_angle_degrees",
      -      "illuminated_fraction",
      -      "phase_name",
      -      "age_days",
      -      "next_quarters"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "time_utc",
      +      "phase_longitude_degrees",
      +      "illuminated_fraction",
      +      "phase_name",
      +      "age_days",
      +      "next_quarters"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • removedOutput schema / properties / phase_angle_degrees
      Removed value: -{
      -  "description": "Moon phase angle in degrees: 0 = new, 90 = first quarter, 180 = full, 270 = last quarter.",
      -  "type": "number"
      -}
    • addedOutput schema / properties / phase_longitude_degrees
      Added value: +{
      +  "description": "The Moon's ecliptic longitude minus the Sun's, in degrees [0,360): 0 = new, 90 = first quarter, 180 = full, 270 = last quarter. Not the Sun–body–observer phase angle astronomy_get_sky_position reports as phase_angle_degrees, which reads 0 at full moon.",
      +  "type": "number"
      +}
  2. 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": [
      +      "time_utc",
      +      "phase_angle_degrees",
      +      "illuminated_fraction",
      +      "phase_name",
      +      "age_days",
      +      "next_quarters"
      +    ]
      +  },
      +  {
      +    "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. 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: -[
      -  "time_utc",
      -  "phase_angle_degrees",
      -  "illuminated_fraction",
      -  "phase_name",
      -  "age_days",
      -  "next_quarters"
      -]
  3. Changed1 schema field changed
    • changedInput schema / properties / time / description
      Previous value: -"Instant to evaluate as an ISO 8601 UTC string, e.g. \"2024-12-15T00:00:00Z\". Defaults to now."New value: +"Instant to evaluate as an ISO 8601 UTC string, e.g. \"2024-12-15T00:00:00Z\". Defaults to now. A value with no zone designator is read as UTC, not the local zone of the server process."
  4. 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 and idempotentHint, so safety is covered. The description adds substantial behavioral context: time defaults to now, a value with no zone designator is read as UTC, timezone produces observer-local timestamps, and the phase is geocentric. It also spells out the output fields, which is valuable despite the output schema. No contradictions 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.

Conciseness4/5

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

The description is moderately long but every sentence earns its place. It front-loads the core output list, then gives use cases, then parameter behavior. The structure is logical and not padded. It could be trimmed slightly but is well-organized.

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 the tool's moderate complexity, the presence of an output schema, and the annotations, the description is fully complete. It covers parameters, defaults, timezone semantics, and the geocentric nature, leaving no ambiguity about how to call it or what to expect. An agent can confidently invoke it without further research.

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 description coverage is 100%, so the baseline is 3. However, the description adds meaningful details beyond the schema: it clarifies the default for time, the UTC interpretation for missing zone designators, and the effect of timezone on output. These are practical nuances that help an agent use the parameters correctly, justifying a 4.

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 states a specific verb ('Report') and a clear resource ('Moon phase'), enumerating exactly what data it returns: illuminated fraction, phase name, synodic age, phase longitude, and next four quarter phases. This is far beyond a generic 'get moon phase' and distinguishes it from siblings like astronomy_get_ephemeris or astronomy_get_rise_set, which serve different purposes.

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 explicitly mentions typical queries ('what is the moon phase tonight' and 'when is the next full moon') and explains that a single call covers both without iteration. It also notes that the phase is geocentric and no observer location is needed, which implicitly tells agents when to prefer this over location-dependent tools. It stops short of explicitly naming alternative tools or exclusions, so it doesn't reach a 5.

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.