Skip to main content

Western Moon Phase

asterwise_get_western_moon_phase

Calculates the tropical lunar phase for any date using Swiss Ephemeris. Returns the phase name, phase angle, illumination percentage, Moon age in days, and the next major phase transition.

Parameters​

ParameterTypeRequiredDescription
response_formatenum: markdown, jsonnoOutput format: 'markdown' (default) for a readable report, or 'json' for the raw structured payload.
datestring/nullnoDate for the moon phase, YYYY-MM-DD. Defaults to today.

What it covers​

Eight-phase tropical lunar cycle: New Moon (0°), Waxing Crescent, First Quarter (90°), Waxing Gibbous, Full Moon (180°), Waning Gibbous, Last Quarter (270°), Waning Crescent. Phase angle is Sun–Moon elongation in degrees (0–360). Illumination percentage is derived from the phase angle using the cosine formula. Moon age is days since last New Moon.

Workflow​

BEFORE: None — standalone.
AFTER: asterwise_get_western_moon_calendar — get the full month's phase data.

Input​

date (optional string YYYY-MM-DD) — Date to compute phase for. Defaults to today.
Example: '2026-05-01'

Output contract​

data.date (string — YYYY-MM-DD)
data.phase_name (string — one of the eight canonical phase names)
data.phase_angle (float — 0–360°, Sun–Moon elongation)
data.illumination_pct (float — 0–100)
data.moon_age_days (float — days since New Moon)
data.moon_longitude (float — tropical ecliptic longitude)
data.sun_longitude (float — tropical ecliptic longitude)
data.is_waxing (bool — true from New to Full Moon)
data.next_phase_name (string — next major phase)
data.next_phase_date (string — approximate YYYY-MM-DD of next major phase)

Response format​

response_format=json — structured phase data.
response_format=markdown — human-readable moon report.

Compute class​

FAST_LOOKUP

Errors​

INVALID_PARAMS (local): None — date validated upstream.
INTERNAL_ERROR: Any upstream API failure → MCP INTERNAL_ERROR

Do not confuse with​

asterwise_get_western_moon_calendar — full monthly day-by-day phase table.
asterwise_get_panchanga — Vedic tithi system (lunar day based on 12° arc increments).

Connect​

Remote MCP endpoint: https://mcp.asterwise.com/mcp. Authenticate with Authorization: Bearer <API key> or OAuth. See the MCP setup guide.