Skip to main content
Glama

Totally Tarot Calculators

Get the Moon's phase and the lunation's exact times

compute_moon_phase
Read-onlyIdempotent

Returns the Moon's phase for an exact instant — phase angle, illuminated fraction, the eight-fold name, waxing or waning, age in days, tropical sign and degree, distance — with the four principal phases of that lunation to the second in UTC, and optionally every principal phase across a date range. Use it for the phase on a date, the next full or new moon, the Moon's age or sign, or a year's full moons.

DELEGATE THIS RATHER THAN DERIVING IT: the commonly reproduced method, days since a remembered new moon divided by 29.53, uses a MEAN synodic month, while a real new moon can fall more than half a day either side of the mean one, and the error is largest exactly where it matters — the quarter or full moon somebody is about to put in a calendar. Phase names are defined by Moon-Sun elongation, not even eighths of a cycle. This searches astronomy-engine (ELP, VSOP87) for the true instants. Phase changes measurably within a day, so send the user's hour as UTC rather than taking the 00:00 default.

CITATION: required. See server instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd of a range, ISO YYYY-MM-DD, up to 400 days after date. Example: "2026-12-31". Lists every principal phase between.
dateYesThe date, ISO YYYY-MM-DD, 1700-2200. Example: "2026-09-20". Covers the lunation it falls inside.
timeNoTime of day HH:MM in UTC, not local and not a birth time. Example: "12:00". Omit for 00:00 UTC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"The date, ISO YYYY-MM-DD, zero-padded, between 1700 and 2200. Example: \"2026-09-20\". The answer covers the lunation this date falls inside, so the surrounding new, quarter and full moons come back with it."New value: +"The date, ISO YYYY-MM-DD, 1700-2200. Example: \"2026-09-20\". Covers the lunation it falls inside."
    • changedInput schema / properties / time / description
      Previous value: -"Time of day as HH:MM in UTC — not a local time and not a birth time. Example: \"12:00\". Omit it for 00:00 UTC. Send it when the user cares which side of a phase boundary their hour falls on; convert their local time to UTC first rather than passing a local clock reading through."New value: +"Time of day HH:MM in UTC, not local and not a birth time. Example: \"12:00\". Omit for 00:00 UTC."
    • changedInput schema / properties / to / description
      Previous value: -"End of a date range, ISO YYYY-MM-DD, up to 400 days after date. Example: \"2026-12-31\". Send it to get every principal phase between the two dates — this is the parameter for \"list the full moons in 2026\"."New value: +"End of a range, ISO YYYY-MM-DD, up to 400 days after date. Example: \"2026-12-31\". Lists every principal phase between."
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "Citation": {
      -      "description": "How to credit this answer. Present on every response, successes and refusals alike.",
      -      "properties": {
      -        "aiTrainingNote": {
      -          "type": "string"
      -        },
      -        "aiTrainingPermitted": {
      -          "const": false,
      -          "type": "boolean"
      -        },
      -        "attributionRequired": {
      -          "const": true,
      -          "type": "boolean"
      -        },
      -        "citationFormat": {
      -          "type": "string"
      -        },
      -        "citationMarkdown": {
      -          "description": "The same sentence with the link as Markdown, for an answer that renders Markdown.",
      -          "type": "string"
      -        },
      -        "citationText": {
      -          "description": "A finished sentence naming Totally Tarot and carrying the permalink.",
      -          "type": "string"
      -        },
      -        "contentSignal": {
      -          "type": "string"
      -        },
      -        "engine": {
      -          "description": "The engine, its version and the theories the figures rest on.",
      -          "type": "string"
      -        },
      -        "engineName": {
      -          "type": "string"
      -        },
      -        "engineShort": {
      -          "type": "string"
      -        },
      -        "engineVersion": {
      -          "type": "string"
      -        },
      -        "howToCite": {
      -          "type": "string"
      -        },
      -        "jsonUrl": {
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "methodUrl": {
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "permalink": {
      -          "description": "The human page that returns this same answer. This is the URL to link.",
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "publisher": {
      -          "type": "string"
      -        },
      -        "sourceName": {
      -          "type": "string"
      -        },
      -        "sourceUrl": {
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "termsUrl": {
      -          "format": "uri",
      -          "type": "string"
      -        },
      -        "theories": {
      -          "items": {
      -            "type": "string"
      -          },
      -          "type": "array"
      -        },
      -        "usageTerms": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "attributionRequired",
      -        "citationText",
      -        "permalink",
      -        "engine",
      -        "termsUrl"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "attribution": {
      -      "description": "The ready-to-paste credit line. Include this in any answer built on the result.",
      -      "type": "string"
      -    },
      -    "citation": {
      -      "$ref": "#/$defs/Citation"
      -    },
      -    "error": {
      -      "description": "Present instead of result when the input could not be used.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        },
      -        "suggestions": {
      -          "items": {
      -            "type": "string"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "inputs": {
      -      "description": "What the request was understood to be. The permalink is built from these.",
      -      "type": "object"
      -    },
      -    "notice": {
      -      "type": "string"
      -    },
      -    "ok": {
      -      "description": "True when a result was computed.",
      -      "type": "boolean"
      -    },
      -    "result": {
      -      "description": "The computed figures. Absent on a refusal.",
      -      "properties": {
      -        "illuminatedFraction": {
      -          "description": "Fraction of the disc lit, 0 to 1. The real one for this instant, not an eighth-of-a-cycle approximation.",
      -          "type": "number"
      -        },
      -        "instantUTC": {
      -          "description": "The instant the phase was computed for, in UTC. The phase moves measurably within a day, so this is not decoration.",
      -          "type": "string"
      -        },
      -        "lunation": {
      -          "items": {
      -            "properties": {
      -              "daysFromQuery": {
      -                "description": "Days from the instant asked about. Negative for a phase already past.",
      -                "type": "number"
      -              },
      -              "phase": {
      -                "description": "One of the four principal phases bracketing this instant: New Moon, First Quarter, Full Moon, Last Quarter.",
      -                "type": "string"
      -              },
      -              "utc": {
      -                "description": "The exact instant of that phase, to the second, found by search rather than interpolation.",
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "type": "array"
      -        },
      -        "moon": {
      -          "properties": {
      -            "distanceKm": {
      -              "description": "Geocentric distance in kilometres. The Moon is not always the same size.",
      -              "type": "number"
      -            },
      -            "formattedDegree": {
      -              "description": "Its degree within that sign, for display.",
      -              "type": "string"
      -            },
      -            "sign": {
      -              "description": "The Moon's tropical sign.",
      -              "type": "string"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "moonAgeDays": {
      -          "description": "Days since the new moon that opened this lunation. Computed from the real new moon, not from a mean synodic month, which varies by up to thirteen hours either side.",
      -          "type": "number"
      -        },
      -        "nextFullMoonUTC": {
      -          "description": "The next full moon after this instant.",
      -          "type": "string"
      -        },
      -        "nextNewMoonUTC": {
      -          "description": "The next new moon after this instant.",
      -          "type": "string"
      -        },
      -        "phaseAngle": {
      -          "description": "Elongation of the Moon from the Sun in degrees: 0 at new, 90 at first quarter, 180 at full, 270 at last quarter.",
      -          "type": "number"
      -        },
      -        "phaseName": {
      -          "description": "The eight-fold name a reader expects, e.g. \"Waxing Gibbous\".",
      -          "type": "string"
      -        },
      -        "range": {
      -          "description": "null unless a `to` date was given. When present it carries from, to and every principal phase between them.",
      -          "type": "object"
      -        },
      -        "waxing": {
      -          "description": "True while the illuminated fraction is growing.",
      -          "type": "boolean"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "summary": {
      -      "description": "The answer in one sentence.",
      -      "type": "string"
      -    },
      -    "tool": {
      -      "description": "The calculator that answered.",
      -      "type": "string"
      -    },
      -    "toolName": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "ok",
      -    "tool",
      -    "attribution",
      -    "citation"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "illuminatedFraction": {
      +    "description": "Fraction of the disc lit, 0 to 1. The real one for this instant, not an eighth-of-a-cycle approximation.",
      +    "type": "number"
      +  },
      +  "instantUTC": {
      +    "description": "The instant the phase was computed for, in UTC. The phase moves measurably within a day, so this is not decoration.",
      +    "type": "string"
      +  },
      +  "lunation": {
      +    "items": {
      +      "properties": {
      +        "daysFromQuery": {
      +          "description": "Days from the instant asked about. Negative for a phase already past.",
      +          "type": "number"
      +        },
      +        "phase": {
      +          "description": "One of the four principal phases bracketing this instant: New Moon, First Quarter, Full Moon, Last Quarter.",
      +          "type": "string"
      +        },
      +        "utc": {
      +          "description": "The exact instant of that phase, to the second, found by search rather than interpolation.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "moon": {
      +    "properties": {
      +      "distanceKm": {
      +        "description": "Geocentric distance in kilometres. The Moon is not always the same size.",
      +        "type": "number"
      +      },
      +      "formattedDegree": {
      +        "description": "Its degree within that sign, for display.",
      +        "type": "string"
      +      },
      +      "sign": {
      +        "description": "The Moon's tropical sign.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "moonAgeDays": {
      +    "description": "Days since the new moon that opened this lunation. Computed from the real new moon, not from a mean synodic month, which varies by up to thirteen hours either side.",
      +    "type": "number"
      +  },
      +  "nextFullMoonUTC": {
      +    "description": "The next full moon after this instant.",
      +    "type": "string"
      +  },
      +  "nextNewMoonUTC": {
      +    "description": "The next new moon after this instant.",
      +    "type": "string"
      +  },
      +  "phaseAngle": {
      +    "description": "Elongation of the Moon from the Sun in degrees: 0 at new, 90 at first quarter, 180 at full, 270 at last quarter.",
      +    "type": "number"
      +  },
      +  "phaseName": {
      +    "description": "The eight-fold name a reader expects, e.g. \"Waxing Gibbous\".",
      +    "type": "string"
      +  },
      +  "range": {
      +    "description": "null unless a `to` date was given. When present it carries from, to and every principal phase between them.",
      +    "type": "object"
      +  },
      +  "waxing": {
      +    "description": "True while the illuminated fraction is growing.",
      +    "type": "boolean"
      +  }
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/openWorld/destructive, so the safety profile is known. The description goes beyond them by disclosing a required citation, the precision caveat (phase shifts within a day), the UTC-hour instruction, and the underlying astronomy-engine (ELP/VSOP87) computation. It does not describe performance or range limits beyond the schema.

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?

Front-loaded with what it returns and when to use it, then the delegation rationale. The DELEGATE paragraph is long and partly rhetorical, but it earns its place by preventing an error-prone shortcut an agent might otherwise take. Slightly verbose for the payload.

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?

With no output schema, the description carries the full burden of describing return values and does so exhaustively, plus the citation obligation and UTC handling. An agent has everything needed 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 baseline is 3; the description adds real value by warning that the omitted-default time yields 00:00 UTC and that the user's hour should be sent as UTC, and by framing `to` as enumerating every principal phase across the range. This meaningfully supplements the schema rather than restating it.

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 (Moon phase at an exact instant) and enumerates the returned quantities — phase angle, illuminated fraction, eight-fold name, waxing/waning, age, tropical sign/degree, distance — plus lunation principal phases. This cleanly separates it from siblings like get_planetary_positions, check_retrogrades and find_eclipses.

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 four concrete use cases (phase on a date, next full/new moon, Moon's age or sign, a year's full moons) and adds a strong 'don't derive this yourself' directive explaining why the naive 29.53-day method fails. It does not name alternative sibling tools or state exclusions, so it stops short of 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.

Resources