Skip to main content
Glama
hhw67865

TripAdvisor Vacation Planner MCP Server

by hhw67865

get_location_details_tool

Retrieve essential location details by ID to support trip planning decisions with TripAdvisor data.

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 main handler function for the 'get_location_details_tool' tool. It is registered using the @mcp.tool() decorator and implements the logic to fetch location details from the TripAdvisor API, extracting essential information like name, description, hours, rating, and address.
    @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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Get essential details', implying a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error conditions, or what 'essential details' includes (e.g., format, completeness). For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: one stating the purpose and one detailing the parameter. It's front-loaded with the core function. There's minimal waste, though the 'Args:' section could be integrated more smoothly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low schema coverage, the description is moderately complete. It covers the purpose and parameter semantics adequately but lacks behavioral details (e.g., response format, errors) and usage guidelines. For a simple lookup tool, it meets minimum viability but has clear gaps in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning by specifying 'location_id: TripAdvisor location ID', clarifying the source and type beyond the schema's 'integer' type. With only 1 parameter, this provides adequate semantic context, though it doesn't explain format constraints (e.g., valid ID ranges).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'essential details about a location by ID', with the specific context 'for trip planning'. It distinguishes from siblings like 'get_nearby_locations' (multiple locations) and 'search_locations' (search vs. get by ID), but doesn't explicitly differentiate from 'plan_vacation' which might be higher-level. The purpose is specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_nearby_locations' or 'search_locations'. It mentions 'for trip planning', which gives some context but doesn't specify scenarios where this is preferred over siblings. There are no explicit when/when-not statements or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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