Skip to main content
Glama

ta_search_locations

Read-only

Search TripAdvisor for restaurants, attractions, or hotels by name, category, or location. Returns location IDs with pagination to feed detail lookups.

Instructions

Search TripAdvisor locations (restaurants, attractions, hotels) by name. Returns matches with a location id for the detail tools, plus pagination. Returns slim summaries by default; pass view:"full" for the whole records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage index (1-based)
sizeNoResults per page (max 20)
viewNoResponse shape: "compact" (default) drops fields the response already carries elsewhere; "full" returns every field this server understands. compact returns the slim projection where one exists and strips image URLs elsewhere; "full" returns TripAdvisor's whole records.
queryYesText to search location names for
localeNoPreferred locales for localized fields, in priority order (e.g. ["en","es"])
categoryNoRestrict to one category
geo_nameNoCity, town, or country name to scope the search
postal_codeNoPostal/ZIP code (takes precedence over geo_name)
country_codeNoAlpha-2 country code (e.g. "US")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv0.5.1
    • removedInput schema / properties / compact
      Removed value: -{
      -  "description": "Return a slim summary per result (id, name, category, city, rating, review_count, url) instead of full records",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "Response shape: \"compact\" (default) drops fields the response already carries elsewhere; \"full\" returns every field this server understands. compact returns the slim projection where one exists and strips image URLs elsewhere; \"full\" returns TripAdvisor's whole records.",
      +  "enum": [
      +    "compact",
      +    "full"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / compact
      Added value: +{
      +  "description": "Return a slim summary per result (id, name, category, city, rating, review_count, url) instead of full records",
      +  "type": "boolean"
      +}
  4. Changed17 schema fields changedv0.1.0
    • removedInput schema / properties / address
      Removed value: -{
      -  "description": "Address filter",
      -  "type": "string"
      -}
    • changedInput schema / properties / category / description
      Previous value: -"Restrict results to one property type"New value: +"Restrict to one category"
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "hotels",
      -  "attractions",
      -  "restaurants",
      -  "geos"
      -]New value: +[
      +  "RESTAURANT",
      +  "ATTRACTION",
      +  "HOTEL"
      +]
    • addedInput schema / properties / country_code
      Added value: +{
      +  "description": "Alpha-2 country code (e.g. \"US\")",
      +  "maxLength": 2,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / geo_name
      Added value: +{
      +  "description": "City, town, or country name to scope the search",
      +  "type": "string"
      +}
    • removedInput schema / properties / language
      Removed value: -{
      -  "description": "Result language code (default: en)",
      -  "type": "string"
      -}
    • removedInput schema / properties / latLong
      Removed value: -{
      -  "description": "Center point to scope the search, e.g. \"42.3455,-71.10767\"",
      -  "pattern": "^-?\\d+(\\.\\d+)?\\s*,\\s*-?\\d+(\\.\\d+)?$",
      -  "type": "string"
      -}
    • addedInput schema / properties / locale
      Added value: +{
      +  "description": "Preferred locales for localized fields, in priority order (e.g. [\"en\",\"es\"])",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / page
      Added value: +{
      +  "description": "Page index (1-based)",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / phone
      Removed value: -{
      -  "description": "Phone number filter (spaces/dashes ok, no leading \"+\")",
      -  "type": "string"
      -}
    • addedInput schema / properties / postal_code
      Added value: +{
      +  "description": "Postal/ZIP code (takes precedence over geo_name)",
      +  "type": "string"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Text to search location names for",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / radius
      Removed value: -{
      -  "description": "Search radius around latLong (must be > 0)",
      -  "exclusiveMinimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / radiusUnit
      Removed value: -{
      -  "description": "Unit for radius",
      -  "enum": [
      -    "km",
      -    "mi",
      -    "m"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / searchQuery
      Removed value: -{
      -  "description": "Text to search location names for",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / size
      Added value: +{
      +  "description": "Results per page (max 20)",
      +  "maximum": 20,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "searchQuery"
      -]New value: +[
      +  "query"
      +]
  5. First observedv0.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=truecribing safety and world-open behavior. The description adds beyond that: a default slim summary response, the ability to pass view:"full" for complete records, the presence of pagination, and that returned IDs feed the detail tools. It does not contradict the 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?

The description is compact and efficient: two sentences convey the verb, resource, scope, output behavior, pagination, and view switching. It front-loads the search name and purpose before touching response details, with no filler or redundant restatement of the tool name.

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

Completeness4/5

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

For a 9-parameter tool with no output schema, the description covers the critical use context: it returns matches, each with a location id, supports pagination, and defaults to slim records unless view:"full" is passed. It does not describe the exact summary record shape or pagination mechanics, but those are adequately covered by the fully described parameter schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter. The description only reinforces the view parameter (e.g., pass view:"full") without adding new meaning to query, locale, geo_name, postal_code, or the pagination parameters. This matches the baseline 3 for a fully documented schema.

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?

The description uses a specific verb ('Search') and a clear resource ('TripAdvisor locations') with the enumerated categories (restaurants, attractions, hotels). It adds that results include a location id for the detail tools, which distinguishes this search tool from the sibling detail tools and from ta_search_nearby via the 'by name' qualifier.

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

Usage Guidelines3/5

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

The description implies a workflow: use this search to get a location id, then use the detail tools. However, it does not explicitly state when NOT to use this tool or name alternatives such as ta_search_nearby for proximity-based searches or ta_get_locations when IDs are already known. The guidance is present but only implicit.

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