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"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what data is returned but doesn't mention critical behavioral aspects like whether this is a read-only operation, if it requires authentication, rate limits, error conditions, or response format. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and lists all returned data points without any wasted words. Every element serves a clear purpose, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters, no output schema, no annotations), the description is partially complete. It clearly states what data is returned but lacks behavioral context and output details. Without annotations or an output schema, the description should do more to compensate, but it at least defines the core purpose adequately.

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?

The schema description coverage is 100%, with both parameters (q and dt) fully documented in the schema. The description adds minimal value beyond the schema by mentioning 'location and date' but doesn't provide additional syntax, format details, or constraints. This meets the baseline of 3 when the schema does the heavy lifting.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('astronomy data'), and lists the specific data points returned (sunrise, sunset, moonrise, moonset, moon phase, moon illumination percentage). It distinguishes itself from siblings like get_current_weather or get_forecast by focusing exclusively on astronomical events.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. While it implicitly suggests use for astronomical data, it doesn't mention when not to use it (e.g., for weather data) or refer to sibling tools like get_timezone for time-related queries or get_history for past data. Usage context is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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