Skip to main content
Glama
jagan-shanmugam

OpenStreetMap MCP Server

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)
        }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes the calculation and recommendation process but lacks critical behavioral details: it doesn't specify what algorithm is used for calculating the 'optimal' center, whether it considers travel time or just geographic midpoint, what data sources it uses for venue recommendations, or any rate limits or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections: purpose statement, explanation of functionality, usage context, parameter details, and return values. While slightly longer than minimal, every sentence adds value. The Args/Returns sections could be integrated more seamlessly, but overall it's efficiently organized.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description provides adequate coverage of purpose, parameters, and returns. However, it lacks details about the algorithm used, data sources, error conditions, or performance characteristics that would be helpful for an AI agent to understand behavioral boundaries and limitations.

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 detailed parameter semantics. It explains that 'locations' is a list of dictionaries with latitude/longitude pairs and provides a concrete example. It also explains 'venue_type' as a string with enumerated options like 'cafe', 'restaurant', etc., and specifies a default value of 'cafe'.

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 tool's purpose with specific verbs ('find', 'calculates', 'recommends') and resources ('optimal meeting place', 'central meeting point', 'suitable venues'). It distinguishes from siblings like 'find_nearby_places' by emphasizing multi-person coordination and venue recommendations based on calculated centrality.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('planning social gatherings, business meetings, or any situation where multiple people need to converge from different starting points'), but does not explicitly state when NOT to use it or name specific alternatives among sibling tools like 'find_nearby_places' or 'explore_area'.

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

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