Skip to main content
Glama

get_celestial_pos

Calculate altitude and azimuth angles for celestial objects like the sun, moon, and stars at specific locations and times.

Instructions

Calculate the altitude and azimuth angles of a celestial object.

Args: celestial_object: Name of object (e.g. "sun", "moon", "andromeda") lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string

Returns: Dict with keys "data", "_meta". "data" contains "altitude" and "azimuth" (degrees).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
celestial_objectYes
lonYes
latYes
timeYes
time_zoneYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function decorated with @mcp.tool() that implements the core logic of the get_celestial_pos tool, processing inputs, calling the celestial_pos computation, and formatting the response.
    @mcp.tool()
    async def get_celestial_pos(
        celestial_object: str,
        lon: float,
        lat: float,
        time: str,
        time_zone: str
    ) -> Dict[str, Any]:
        """Calculate the altitude and azimuth angles of a celestial object.
    
        Args:
            celestial_object: Name of object (e.g. "sun", "moon", "andromeda")
            lon: Observer longitude in degrees
            lat: Observer latitude in degrees
            time: Observation time string "YYYY-MM-DD HH:MM:SS"
            time_zone: IANA timezone string
    
        Returns:
            Dict with keys "data", "_meta". "data" contains "altitude" and "azimuth" (degrees).
        """
        location, time_info = process_location_and_time(lon, lat, time, time_zone)
        # Run synchronous celestial calculations in a separate thread to avoid blocking the event loop
        alt, az = await asyncio.to_thread(celestial_pos, celestial_object, location, time_info)
        return format_response({
            "altitude": alt,
            "azimuth": az
        })
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not behavioral traits. It doesn't disclose whether calculations are approximate vs precise, what coordinate system is used, error handling, or performance characteristics. For a calculation tool with 5 parameters, this leaves significant behavioral gaps.

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?

Perfectly structured with purpose statement, parameter explanations, and return format - all in minimal sentences. Every element earns its place with no redundancy. The Args/Returns sections are appropriately formatted.

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 calculation complexity and 5 parameters with no annotations, the description does well with parameter semantics and output explanation. However, it lacks context about calculation methods, precision, or limitations. The presence of an output schema (implied by Returns section) helps but doesn't fully compensate for missing behavioral context.

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 clear semantics for all 5 parameters: object name examples, coordinate units (degrees), time format, and timezone standard. This adds substantial value beyond the bare 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 specific verb 'calculate' and the exact resource 'altitude and azimuth angles of a celestial object'. It distinguishes from siblings like 'get_celestial_rise_set' (rise/set times) and 'get_constellation' (constellation identification) by focusing on positional calculations.

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

Usage Guidelines3/5

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

The description implies usage when altitude/azimuth calculations are needed, but provides no explicit guidance on when to choose this tool versus alternatives like 'get_visible_planets' or 'get_celestial_rise_set'. No exclusions or prerequisites are mentioned.

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