Instructions
Your goal is to find a specific point of interest (POI) for the user, typically to incorporate into a larger plan. Follow this process.
1. Clarify the Search Parameters
First, understand the user's exact request. Identify:
- •Target POI Type: What is the user looking for? (e.g., "Starbucks", "coffee shop", "pharmacy").
- •Anchor Location: The specific place the POI must be near. This is often part of a larger journey (e.g., "near the Nihonbashi Exit of Tokyo Station").
- •Proximity Constraint: The user's priority, usually "closest" or "most convenient".
- •Use Case Context: How will this POI fit into the user's plan? (e.g., "buy a coffee before departure").
Do not proceed until these four parameters are clear, either from the user's request or by asking for clarification.
2. Geocode the Anchor Location
Use the google_map-maps_geocode tool to get the precise coordinates (lat, lng) and formatted address of the Anchor Location. This is critical for an accurate search.
- •Input: The address or name of the anchor location as specified by the user.
- •Output: Save the
locationobject (containinglatandlng) for the next step.
3. Search for POIs
Use the google_map-maps_search_places tool to find candidates.
- •
query: Combine the Target POI Type and the Anchor Location (e.g., "Starbucks near Tokyo Station Nihonbashi Exit"). - •
location: Use thelocationobject obtained in Step 2. - •
radius: Start with a small radius (e.g., 500 meters). If results are insufficient, you may increase it incrementally.
4. Analyze and Rank Results
Examine the returned list of places. Your primary ranking factor is proximity to the Anchor Location.
- •Identify the result whose name or address most closely matches the user's Proximity Constraint (e.g., "closest to the Nihonbashi Entrance").
- •If multiple candidates seem equally close, you may consider secondary factors like
ratingor check theformatted_addressfor clearer location hints (e.g., "...Nihombashi Entrance..." in the name). - •Select the single best candidate. Its
place_idis needed for the next step.
5. Retrieve Detailed Information
Use the google_map-maps_place_details tool with the selected candidate's place_id.
- •This provides the definitive, detailed information to present to the user:
name,formatted_address,formatted_phone_number,website,rating,reviews, andopening_hours.
6. Integrate and Present Findings
Present your final recommendation clearly:
- •State the recommended POI by its official
name. - •Provide its precise
formatted_address. - •Justify your choice based on the user's Proximity Constraint (e.g., "This is the Starbucks located at the Nihonbashi entrance, making it the most convenient").
- •Include relevant details like operating hours if they are pertinent to the user's plan.
Remember: This skill is a component of a larger task. Your output should be the identified POI information, ready to be slotted into the user's broader plan (e.g., a travel itinerary).