Skip to main content
Glama
light_pollution_demo.py1.22 kB
import asyncio from src.placefinder import get_light_pollution_grid from src.response import format_response async def main(): print("Testing light_pollution_map logic...") # Define a small area (e.g., around a park in Beijing) south = 39.99 north = 40.01 west = 116.29 east = 116.31 try: # Simulate tool execution print("Calling get_light_pollution_grid directly...") raw_result = get_light_pollution_grid( south=south, west=west, north=north, east=east, zoom=10 ) result = format_response(raw_result) print("\nResult Metadata:") print(result.get("_meta")) data = result.get("data", {}) print("\nData Metadata:") print(data.get("metadata")) points = data.get("data", []) print(f"\nNumber of points found: {len(points)}") if points: print("\nSample Point:") print(points[0]) except Exception as e: print(f"Error: {e}") import traceback traceback.print_exc() if __name__ == "__main__": asyncio.run(main())

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