Skip to main content
Glama
pab1it0

Tripadvisor MCP

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
NameRequiredDescriptionDefault
locationIdYes
languageNoen

Implementation Reference

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

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/pab1it0/tripadvisor-mcp'

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