get_location_reviews
Retrieve user reviews for a specific Tripadvisor location to assess visitor experiences and ratings.
Instructions
Get reviews for a specific location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | Yes | ||
| language | No | en |
Implementation Reference
- src/tripadvisor_mcp/server.py:126-145 (handler)The main handler function decorated with @mcp.tool for registration. Implements the logic to fetch reviews for a Tripadvisor location by making an API request to the reviews endpoint.@mcp.tool(description="Get reviews for a specific location") async def get_location_reviews( locationId: Union[str, int], language: str = "en", ) -> Dict[str, Any]: """ Get the most recent reviews for a specific location. Parameters: - locationId: Tripadvisor location ID (can be string or integer) - language: Language code (default: 'en') """ params = { "language": language, } # Convert locationId to string to ensure compatibility location_id_str = str(locationId) return await make_api_request(f"location/{location_id_str}/reviews", params)