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)
        }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the calculating/recommending behavior and output structure, and it implies read-only semantics ('recommends') without explicitly stating no side effects. It does not define what 'optimal' means (e.g., geographic vs. travel-time) or address failure modes, leaving moderate transparency gaps.

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 an opening summary, a detailed explanatory paragraph, and separate 'Args' and 'Returns' sections. It is moderately concise, though there is some redundancy between the first sentence and the second paragraph. Overall it is organized and readable.

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

Completeness4/5

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

For a two-parameter tool with no output schema, the description covers input structure, venue options, and expected output (center point, venue list, total count). It is adequate for an agent to select and invoke the tool. It omits algorithmic details and error behavior, but these are not essential for basic 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?

Schema description coverage is 0%, so the description must compensate. It provides a concrete example for 'locations' using latitude/longitude dictionaries and lists venue_type options with examples and 'etc.' This adds clear meaning beyond the schema. It does not mention the default 'cafe' for venue_type (though the schema carries that), so a small gap remains.

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 states a specific verb ('Find') and resource ('optimal meeting place for multiple people coming from different locations'), and continues with 'calculates a central meeting point' and 'recommends suitable venues.' This clearly distinguishes it from sibling tools like find_nearby_places (single-origin search) and get_route_directions (routing). The core functionality is immediately evident.

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 explicitly names ideal contexts: 'social gatherings, business meetings, or any situation where multiple people need to converge from different starting points.' This gives clear usage context. However, it does not directly state when not to use it or name alternative tools, so it lacks explicit exclusionary guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.