Skip to main content
Glama

browse_asteroids

Query NASA's asteroid dataset to access detailed information about near-Earth objects and space rocks for research and monitoring purposes.

Instructions

Browse the asteroid dataset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'browse_asteroids' MCP tool. It calls the NASA NEO Browse API endpoint to retrieve a list of near-Earth asteroids, limits the display to 10 per page, and formats key details like ID, name, magnitude, diameter, and hazard status.
    async def browse_asteroids() -> str:
        """Browse the asteroid dataset."""
        url = f"{NASA_API_BASE}/neo/rest/v1/neo/browse"
        data = await make_nasa_request(url)
        
        if not data:
            return "Could not retrieve asteroid dataset due to a connection error."
        
        # Check for error response (must be a dictionary)
        if isinstance(data, dict) and "error" in data:
            return f"API Error: {data.get('error')} - Details: {data.get('details', 'N/A')}"
        if isinstance(data, dict) and data.get("binary_content"):
            return f"Received unexpected binary content from Browse Asteroids API. URL: {data.get('url')}"
    
        try:
            near_earth_objects = data.get('near_earth_objects', [])
            page_info = f"Page {data.get('page', {}).get('number', 'Unknown')} of {data.get('page', {}).get('total_pages', 'Unknown')}"
            total_elements = f"Total elements: {data.get('page', {}).get('total_elements', 'Unknown')}"
            
            result = [page_info, total_elements, ""]
            
            # Limit the number of asteroids displayed to avoid excessive output
            display_limit = 10 
            count = 0
            for asteroid in near_earth_objects:
                if count >= display_limit:
                    result.append(f"n... and {len(near_earth_objects) - display_limit} more asteroids on this page.")
                    break
                result.append(f"ID: {asteroid.get('id', 'Unknown')}")
                result.append(f"Name: {asteroid.get('name', 'Unknown')}")
                result.append(f"Absolute magnitude: {asteroid.get('absolute_magnitude_h', 'Unknown')}")
                result.append(f"Estimated diameter (min): {asteroid.get('estimated_diameter', {}).get('kilometers', {}).get('estimated_diameter_min', 'Unknown')} km")
                result.append(f"Estimated diameter (max): {asteroid.get('estimated_diameter', {}).get('kilometers', {}).get('estimated_diameter_max', 'Unknown')} km")
                result.append(f"Potentially hazardous: {'Yes' if asteroid.get('is_potentially_hazardous_asteroid', False) else 'No'}")
                result.append("-" * 40)
                count += 1
            
            return "n".join(result)
        except Exception as e:
            logger.error(f"Error processing Browse Asteroids data: {str(e)}")
            return f"Error processing asteroid data: {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the action ('browse') without detailing what 'browse' entails—e.g., whether it returns a list, supports filtering, has pagination, or involves read-only vs. mutative operations. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence with no wasted words. It is front-loaded and efficiently conveys the core purpose without redundancy or fluff, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the lack of annotations, no output schema, and multiple sibling tools, the description is incomplete. It doesn't explain what 'browse' returns (e.g., a list, details, or filtered data) or how it differs from other asteroid-related tools. For a tool in a complex context with no structured support, more detail is needed to guide proper usage.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids unnecessary details. A baseline score of 4 is given since no parameters exist, and the description doesn't mislead about inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Browse the asteroid dataset' clearly states the action (browse) and resource (asteroid dataset), providing a basic purpose. However, it doesn't differentiate from sibling tools like 'get_asteroids_feed' or 'get_asteroid_lookup', leaving ambiguity about what specific browsing function this tool provides compared to alternatives.

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?

No guidance is provided on when to use this tool versus alternatives. With multiple sibling tools related to asteroids (e.g., 'get_asteroids_feed', 'get_asteroid_lookup'), the description lacks any context about use cases, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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/AnCode666/nasa-mcp'

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