Skip to main content
Glama

get_nightly_forecast

Generate a personalized stargazing forecast with visible planets and deep-sky objects for your location and date.

Instructions

Get a curated list of best objects to view for the night.

Args: lon: Observer longitude in degrees lat: Observer latitude in degrees time: Date string "YYYY-MM-DD HH:MM:SS" (Time of observation, or just date) time_zone: IANA timezone string limit: Max number of deep-sky objects to return (default 20)

Returns: Dict with keys: - moon_phase: Moon details - planets: List of visible planets - deep_sky: Sorted list of deep sky objects (Messier/NGC)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lonYes
latYes
timeYes
time_zoneYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_nightly_forecast' tool. It is decorated with @mcp.tool(), processes input parameters, calls the core computation in a thread, and formats the response.
    @mcp.tool()
    async def get_nightly_forecast(
        lon: float,
        lat: float,
        time: str,
        time_zone: str,
        limit: int = 20
    ) -> Dict[str, Any]:
        """Get a curated list of best objects to view for the night.
        
        Args:
            lon: Observer longitude in degrees
            lat: Observer latitude in degrees
            time: Date string "YYYY-MM-DD HH:MM:SS" (Time of observation, or just date)
            time_zone: IANA timezone string
            limit: Max number of deep-sky objects to return (default 20)
            
        Returns:
            Dict with keys:
            - moon_phase: Moon details
            - planets: List of visible planets
            - deep_sky: Sorted list of deep sky objects (Messier/NGC)
        """
        location, time_info = process_location_and_time(lon, lat, time, time_zone)
        
        # Run in thread
        result = await asyncio.to_thread(calculate_nightly_forecast, location, time_info, limit)
        
        return format_response(result)
Behavior3/5

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

With no annotations provided, the description carries full burden of behavioral disclosure. It describes what the tool returns (moon phase, planets, deep-sky objects) and mentions the deep-sky objects are 'sorted' and 'best' (implying curation), but doesn't cover important behavioral aspects like whether this makes external API calls, has rate limits, requires authentication, or what happens with invalid inputs. The description adds value but leaves significant behavioral questions unanswered.

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?

The description is well-structured with a clear purpose statement followed by organized Args and Returns sections. Every sentence earns its place by providing essential information. It could be slightly more concise by integrating the purpose with the returns section, but overall it's efficiently organized and front-loaded with the core functionality.

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

Completeness4/5

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

Given the tool's complexity (astronomical calculations with 5 parameters) and the presence of an output schema (implied by the Returns section), the description is reasonably complete. It covers all parameters meaningfully and describes the return structure. However, with no annotations and significant behavioral aspects undisclosed, it doesn't reach full completeness for a tool that likely involves complex calculations and external data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed parameter semantics beyond the bare schema. Each parameter gets clear explanations: longitude/latitude as 'Observer longitude/latitude in degrees', time format as 'Date string "YYYY-MM-DD HH:MM:SS"', timezone as 'IANA timezone string', and limit as 'Max number of deep-sky objects to return (default 20)'. This adds substantial value over the minimal schema.

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 ('curated list of best objects to view for the night'), distinguishing it from siblings like get_visible_planets (which only covers planets) or get_moon_info (which only covers the moon). It explicitly mentions it returns multiple astronomical categories including deep-sky objects.

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?

The description implies usage context by specifying it's for 'the night' and requires observer coordinates and time, but doesn't explicitly state when to use this tool versus alternatives like get_visible_planets or get_moon_info. It provides clear prerequisites (location/time data needed) but lacks explicit comparison to sibling tools.

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/StarGazer1995/mcp-stargazing'

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