Skip to main content
Glama

light_pollution_map

Retrieve light pollution data for any location to assess sky brightness, Bortle class, and SQM values for optimal stargazing conditions.

Instructions

Get light pollution data for a specific area.

Returns a grid of light pollution data points including brightness, Bortle class, and SQM.

Args: south, west, north, east: Bounding box coordinates. zoom: Zoom level for the grid resolution (default: 10). Higher zoom means more detailed grid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
southYes
westYes
northYes
eastYes
zoomNo

Implementation Reference

  • The core handler function for the 'light_pollution_map' MCP tool. It is decorated with @mcp.tool() which handles registration and schema inference from the signature and docstring. The function computes light pollution grid data off-thread using a helper and formats the response.
    @mcp.tool() async def light_pollution_map( south: float, west: float, north: float, east: float, zoom: int = 10 ) -> Dict[str, Any]: """Get light pollution data for a specific area. Returns a grid of light pollution data points including brightness, Bortle class, and SQM. Args: south, west, north, east: Bounding box coordinates. zoom: Zoom level for the grid resolution (default: 10). Higher zoom means more detailed grid. """ def _compute(): return get_light_pollution_grid(north=north, south=south, east=east, west=west, zoom=zoom) result = await asyncio.to_thread(_compute) return format_response(result)
  • Supporting utility function called by the tool handler to fetch the light pollution grid data from the stargazingplacefinder library.
    def get_light_pollution_grid(north: float, south: float, east: float, west: float, zoom: int = 10) -> Dict[str, Any]: return spf.get_light_pollution_grid(north=north, south=south, east=east, west=west, zoom=zoom)

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