Skip to main content
Glama

Astro Agents - research-grade astronomical data API

Moon phase, illumination, distance and next phases

moon_details
Read-onlyIdempotent

Moon phase today and in detail: phase name and angle, illuminated fraction, age, distance, apparent size, the next new, quarter and full Moons, and the next perigee and apogee; with a place, moonrise and moonset. E.g. {datetime: '2026-01-03T12:00:00Z'}. For calendar, weather, photography and tide apps: phase (8 names), phase angle, illuminated fraction, waxing or waning, age in days since the new Moon, Brown lunation number, centre-to-centre distance in km and Earth radii, angular diameter, ecliptic position, the previous new Moon, the next four principal phases and the next perigee and apogee with their distances, to the second. With latitude/longitude: the Moon's altitude and azimuth there and that local day's moonrise, transit and moonset. Perigee and apogee match NASA/JPL Horizons to the minute. Deterministic (JPL DE440, no LLM); every result carries meta.result_sha256. Price $0.01 per call via REST POST https://astro-agent.dev/v1/astronomy/moon (x402 or MPP); each client gets 1 free call on the $0.01-0.02 tools, this one included.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "moon_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
datetimeNoThe moment: UTC, an explicit offset, or local civil time at the place given by latitude/longitude. Default: now (UTC, to the minute).
latitudeNoOptional: add the Moon's altitude and azimuth from this place and that local day's moonrise, transit and moonset.
timezoneNoIANA zone for local times, e.g. 'Europe/Paris'. Optional: resolved from the coordinates (with its historical DST rules).
longitudeNoOptional, with latitude.
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?

Beyond annotations, the description discloses determinism (JPL DE440, no LLM), result hash (meta.result_sha256), precision matching NASA/JPL Horizons, pricing ($0.01 per call via REST POST, x402 or MPP), and a free-call allowance. It also clarifies that perigee/apogee are accurate to the minute. This adds substantial behavioral context that the annotations alone do not cover.

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 description is front-loaded with purpose, but it becomes verbose and repetitive: the list of returned values is largely restated across the first two long sentences, and multiple clauses could be tightened. While informative, it does not fully earn its length through non-redundant content.

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 complexity (5 parameters, output schema exists), the description is complete: it covers what is returned, parameter effects, determinism, pricing, and even an example call. An agent has all necessary information to invoke it correctly without needing to inspect the output schema.

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?

With 100% schema description coverage, the schema already documents all five parameters. The description reinforces that latitude/longitude add local altitude/azimuth and moonrise/moonset, and gives an example datetime, but it does not add new semantic detail beyond the schema (e.g., no format hints for timezone beyond the schema's IANA example). The baseline of 3 is appropriate.

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-like scope: 'Moon phase today and in detail' and then enumerates exactly what is returned (phase name, angle, illuminated fraction, age, distance, apparent size, next phases, perigee/apogee, moonrise/moonset). It is highly specific and distinguishes this tool from siblings like rise_set_times or sky_now by focusing on lunar phase and physical ephemeris.

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?

It provides clear usage context: 'For calendar, weather, photography and tide apps'. However, it does not name alternative tools or explicitly state when not to use this one, leaving the agent to infer that other tools cover different aspects (e.g., rise_set_times for general rise/set). So it gives a good but not exhaustive when-to-use signal.

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.