get_location_details
Retrieve comprehensive data about a specific Tripadvisor location, including details, reviews, and photos, to support travel planning and research.
Instructions
Get detailed information about a specific location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | Yes | ||
| language | No | en |
Implementation Reference
- src/tripadvisor_mcp/server.py:105-124 (handler)The handler function implementing the 'get_location_details' tool logic. It makes an API request to Tripadvisor for location details using the make_api_request helper. The @mcp.tool decorator handles registration and schema inference from the signature and docstring.@mcp.tool(description="Get detailed information about a specific location") async def get_location_details( locationId: Union[str, int], language: str = "en", ) -> Dict[str, Any]: """ Get detailed information about a specific location (hotel, restaurant, or attraction). 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}/details", params)