Skip to main content
Glama
nanwer
by nanwer

search_activities

Search for ongoing activities, tours, and sights in any city using Tripadvisor data. Filter by activity type, query, and rating to find things to do.

Instructions

🎯 RENDERING DIRECTIVE — READ FIRST. When this tool returns 2+ activities, you MUST present them as an interactive HTML/React artifact (Artifacts block, not flowing prose). Each activity is a visually distinct CARD with a prominent "Find on Tripadvisor" button styled as an HTML button, NOT an inline markdown link. Include the activity-type badge (Sight / Experience) prominently. If the call is part of a larger trip plan, the plan itself should be an artifact containing the activity cards. Single-result responses may use prose.

Search Tripadvisor's "Things to Do" (sights + bookable experiences/tours) for a location, optionally filtered by free-text query, place type, and minimum rating.

DISTINCT FROM search_events: activities are ongoing (visit a museum, take a cooking class anytime); events are date-specific (a concert on June 21). Use this for "what should I do in X"; use search_events for "what's happening while I'm there".

USE THIS TOOL WHEN:

  • The user asks "what should I do in X" / "things to do in X" / "tours in X"

  • They name an activity type ("cooking classes", "boat tours", "museums", "wine tasting")

  • They want recommendations based on their preferences

Inputs:

  • location (string, required) — free-text city or neighborhood. Combined with query into a single Tripadvisor search.

  • query (string, optional) — free-text filter on activity type. Natural language works: "cooking class", "boat tours", "wine tasting", "free walking tour".

  • place_type_filter (enum, optional, default "both") — one of "sights" (free attractions like museums, viewpoints), "experiences" (bookable tours), or "both" (default).

  • min_rating (float, optional) — minimum review score 0.0-5.0. Results without a rating are excluded when this is set.

  • max_results (int, optional, default 15) — 1-50.

Returns ActivityOffer entries each with:

  • offer_id — Tripadvisor's place_id, stable per activity. Use this to drill in via get_activity_details (when implemented).

  • name — activity name.

  • activity_type — "sight" (free, non-bookable) or "experience" (bookable tour).

  • rating, review_count — 0-5 scale (Tripadvisor's native).

  • description — short prose (often missing on generic city searches; usually present on specific-activity searches).

  • location — text "City, Country".

  • thumbnail — URL (NOT hotlink-safe — don't render as a photo element).

  • highlighted_review — {text, mention_count} — a relevant review snippet.

  • booking_url — Tripadvisor listing URL. For experiences, this is the path to Viator tickets; for sights, it's the info page.

No coordinates and no price. Tripadvisor's search endpoint surfaces neither. Use get_activity_details(offer_id) (when implemented) to get price + duration + a direct Viator URL for bookable experiences.

PRE-CALL ELICITATION — three branches:

Branch 1: User names a specific activity type. "Find cooking classes in Lisbon." → query="cooking class". Search immediately.

Branch 2: User asks for a recommendation. "What should I do in Lisbon?" — before searching, infer the user's interests from conversation context + your own memory of them ("they love food and wine", "they're into history"). Bake the interest into query. NOTE: The MCP tool does NOT read Claude's memory — you (Claude) do the inference and pass the resulting query string. If memory yields nothing actionable, fall to Branch 3.

Branch 3: User is vague and you have no preference signal. "Things to do in Lisbon?" with empty conversation context. Ask ONE clarifying question: "Any particular interest — food, history, outdoors, nightlife?" Then search.

RESULT PRESENTATION:

  • Card-based artifact, one card per result.

  • For Branch 2 (memory-driven), preamble: "Based on your interest in food and wine, here are top-rated experiences in Lisbon." — makes the inference legible.

  • Card content: name, activity_type badge (Sight / Experience), rating + review_count, location, the highlighted_review.text as a 1-line testimonial, "Find on Tripadvisor" button → booking_url.

  • Do NOT render thumbnail as a photo element (Tripadvisor's CDN hotlink-protects). Same no-photos rule as stays/events.

  • For a single result, prose is fine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
locationYes
min_ratingNo
max_resultsNo
place_type_filterNoboth

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses limitations (no coordinates/price), rendering directive, pre-call elicitation strategy, and return format details beyond the input schema, fully compensating for missing annotations.

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

Conciseness5/5

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

Well-structured with front-loaded rendering directive, sections for usage, inputs, returns, and presentation. Every sentence adds value; no fluff.

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

Completeness5/5

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

Completely covers rendering, parameter details, return field descriptions, limitations, and pre-call behavior, making it self-sufficient for correct invocation.

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

Parameters5/5

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

Despite 0% schema coverage, each parameter is explained with context and examples (e.g., query accepts natural language, place_type_filter enum values, min_rating excludes unrated results).

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

Purpose5/5

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

Clearly states it searches Tripadvisor's 'Things to Do' with specific verb 'Search' and distinguishes from sibling tool `search_events` by contrasting ongoing activities vs date-specific events.

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

Usage Guidelines5/5

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

Explicitly lists when to use ('what should I do in X', 'things to do in X', etc.) and when not to (use search_events for date-specific events), plus three detailed pre-call branches.

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/nanwer/trip-search-mcp'

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