Skip to main content
Glama

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
NameRequiredDescriptionDefault
qYesLocation query — city name, lat/lon, zip, postcode, IATA, or IP.
dtYesDate in yyyy-MM-dd format.

Implementation Reference

  • 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;
  • 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"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/weatherapicom/weatherapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server