get_astronomy
Retrieve astronomy data including sunrise, sunset, moonrise, moonset, moon phase, and illumination for any location and date.
Instructions
Get astronomy data for a location and date: sunrise, sunset, moonrise, moonset, moon phase, and moon illumination percentage.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Location query — city name, lat/lon, zip, postcode, IATA, or IP. | |
| dt | Yes | Date in yyyy-MM-dd format. |
Implementation Reference
- src/index.ts:317-320 (handler)The handler logic for the 'get_astronomy' tool, which calls the 'weatherRequest' function with the '/astronomy.json' endpoint.
case "get_astronomy": { const { q, dt } = args as { q: string; dt: string }; result = await weatherRequest("/astronomy.json", { q, dt }); break; - src/index.ts:176-194 (schema)The schema definition for the 'get_astronomy' tool, including its description and expected input arguments (location 'q' and date 'dt').
{ name: "get_astronomy", description: "Get astronomy data for a location and date: sunrise, sunset, moonrise, moonset, moon phase, and moon illumination percentage.", inputSchema: { type: "object", properties: { q: { type: "string", description: "Location query — city name, lat/lon, zip, postcode, IATA, or IP.", }, dt: { type: "string", description: "Date in yyyy-MM-dd format.", }, }, required: ["q", "dt"], }, },