Skip to main content
Glama
hhw67865

TripAdvisor Vacation Planner MCP Server

by hhw67865

get_location_details_tool

Retrieve essential details about a TripAdvisor location by ID to streamline vacation planning, including attractions, restaurants, and hotels.

Instructions

Get essential details about a location by ID for trip planning Args: location_id: TripAdvisor location ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
location_idYes

Implementation Reference

  • The handler function for get_location_details_tool. It uses the tripadvisor_api_request helper to fetch full details from the TripAdvisor API and extracts essential fields like name, description, hours, rating, and address for trip planning.
    @mcp.tool() async def get_location_details_tool(location_id: int) -> str: """ Get essential details about a location by ID for trip planning Args: location_id: TripAdvisor location ID """ # Get basic details full_details = await tripadvisor_api_request(f"location/{location_id}/details") # Extract only the essential information for itinerary planning if "error" not in full_details: essential_details = { "name": full_details.get("name"), "description": full_details.get("description"), "hours": full_details.get("hours", {}).get("weekday_text", []), "rating": full_details.get("rating"), "address": full_details.get("address_obj", {}).get("address_string"), } return json.dumps(essential_details, indent=2) else: return json.dumps(full_details, indent=2) # Return error as is

Other Tools

Related Tools

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

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