Skip to main content
Glama

suggest_meeting_point

Calculate a central meeting point for multiple people from different locations and suggest nearby venues like cafes or restaurants for gatherings.

Instructions

Find the optimal meeting place for multiple people coming from different locations.

This tool calculates a central meeting point based on the locations of multiple individuals, then recommends suitable venues near that central point. Ideal for planning social gatherings, business meetings, or any situation where multiple people need to converge from different starting points.

Args: locations: List of dictionaries, each containing the latitude and longitude of a person's location Example: [{"latitude": 37.7749, "longitude": -122.4194}, {"latitude": 37.3352, "longitude": -121.8811}] venue_type: Type of venue to suggest as a meeting point. Options include: "cafe", "restaurant", "bar", "library", "park", etc.

Returns: Meeting point recommendations including: - Calculated center point coordinates - List of suggested venues with names and details - Total number of matching venues in the area

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationsYes
venue_typeNocafe

Implementation Reference

  • The core handler function decorated with @mcp.tool() that implements the suggest_meeting_point tool logic. It calculates the geometric center (average) of multiple input locations and searches for nearby venues of the specified type using the OSMClient's get_nearby_pois method, first in a 500m radius and expanding to 1000m if none found. Returns center point and top 5 matching venues.
    async def suggest_meeting_point( locations: List[Dict[str, float]], ctx: Context, venue_type: str = "cafe" ) -> Dict[str, Any]: """ Find the optimal meeting place for multiple people coming from different locations. This tool calculates a central meeting point based on the locations of multiple individuals, then recommends suitable venues near that central point. Ideal for planning social gatherings, business meetings, or any situation where multiple people need to converge from different starting points. Args: locations: List of dictionaries, each containing the latitude and longitude of a person's location Example: [{"latitude": 37.7749, "longitude": -122.4194}, {"latitude": 37.3352, "longitude": -121.8811}] venue_type: Type of venue to suggest as a meeting point. Options include: "cafe", "restaurant", "bar", "library", "park", etc. Returns: Meeting point recommendations including: - Calculated center point coordinates - List of suggested venues with names and details - Total number of matching venues in the area """ osm_client = ctx.request_context.lifespan_context.osm_client if len(locations) < 2: raise ValueError("Need at least two locations to suggest a meeting point") # Calculate the center point (simple average) avg_lat = sum(loc.get("latitude", 0) for loc in locations) / len(locations) avg_lon = sum(loc.get("longitude", 0) for loc in locations) / len(locations) ctx.info(f"Calculating center point for {len(locations)} locations: ({avg_lat}, {avg_lon})") # Search for venues around this center point venues = await osm_client.get_nearby_pois( avg_lat, avg_lon, radius=500, # Search within 500m of center categories=["amenity"] ) # Filter venues by type matching_venues = [] for venue in venues: tags = venue.get("tags", {}) if tags.get("amenity") == venue_type: matching_venues.append({ "id": venue.get("id"), "name": tags.get("name", "Unnamed Venue"), "latitude": venue.get("lat"), "longitude": venue.get("lon"), "tags": tags }) # If no venues found, expand search if not matching_venues: ctx.info(f"No {venue_type} found within 500m, expanding search to 1000m") venues = await osm_client.get_nearby_pois( avg_lat, avg_lon, radius=1000, categories=["amenity"] ) for venue in venues: tags = venue.get("tags", {}) if tags.get("amenity") == venue_type: matching_venues.append({ "id": venue.get("id"), "name": tags.get("name", "Unnamed Venue"), "latitude": venue.get("lat"), "longitude": venue.get("lon"), "tags": tags }) # Return the result return { "center_point": { "latitude": avg_lat, "longitude": avg_lon }, "suggested_venues": matching_venues[:5], # Top 5 venues "venue_type": venue_type, "total_options": len(matching_venues) }

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/jagan-shanmugam/open-streetmap-mcp'

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