Skip to main content
Glama
Decodo

Decodo MCP Server

google_travel_hotels

Read-only

Scrape hotel search results from Google Travel. Enter a query like 'hotels in Paris' to retrieve data with options for pagination, locale, and device type.

Instructions

Scrape Google Travel Hotels search results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesHotel search query (e.g., "trivago", "hotels in Paris")
jsRenderNoShould the request be opened in a headless browser, false by default
localeNoLocale of the desired request
deviceTypeNoDevice type to emulate for the request
pageFromNoStarting page number for pagination

Implementation Reference

  • The async handler function that executes the tool logic. It receives scraping parameters, adds the target 'google_travel_hotels' and markdown: true, calls sapiClient.scrape(), and returns the result as text content.
    async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
      const params = {
        ...scrapingParams,
        target: SCRAPER_API_TARGETS.GOOGLE_TRAVEL_HOTELS,
        markdown: true,
      } satisfies ScraperAPIParams;
    
      const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data),
          },
        ],
      };
    }
  • Input schema for the tool. Defines required 'query' (string), and optional fields: jsRender, locale, deviceType, pageFrom.
    description: 'Scrape Google Travel Hotels search results',
    inputSchema: {
      query: z.string().describe('Hotel search query (e.g., "trivago", "hotels in Paris")'),
      jsRender: zodJsRender,
      locale: zodLocale,
      deviceType: zodDeviceType,
      pageFrom: zodPageFrom,
    },
  • The register method that calls server.registerTool() with the name 'google_travel_hotels', the input schema, annotations, and the async handler.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'google_travel_hotels',
        {
          description: 'Scrape Google Travel Hotels search results',
          inputSchema: {
            query: z.string().describe('Hotel search query (e.g., "trivago", "hotels in Paris")'),
            jsRender: zodJsRender,
            locale: zodLocale,
            deviceType: zodDeviceType,
            pageFrom: zodPageFrom,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.GOOGLE_TRAVEL_HOTELS,
            markdown: true,
          } satisfies ScraperAPIParams;
    
          const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(data),
              },
            ],
          };
        }
      );
    };
  • Instantiation of GoogleTravelHotelsTool in the allTools array, making it available for registration on the MCP server.
    new GoogleTravelHotelsTool(),
  • Enum constant SCRAPER_API_TARGETS.GOOGLE_TRAVEL_HOTELS = 'google_travel_hotels' used by the handler to set the scrape target.
    GOOGLE_SEARCH = 'google_search',
    GOOGLE_TRAVEL_HOTELS = 'google_travel_hotels',
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description adds no further behavioral details (e.g., rate limits, result format, pagination behavior). It does not contradict 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?

Single sentence, no wasted words, front-loaded with purpose. Very concise.

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

Completeness2/5

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

For a scraping tool with no output schema and 5 parameters (including pagination), the description is too minimal—lacks return value details, pagination explanation, or any guidance on result structure.

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 coverage is 100% with all parameters described; the description adds no additional parameter-level context beyond what the schema provides, meeting the baseline.

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?

Description clearly states the tool 'Scrape Google Travel Hotels search results' with a specific verb and resource, distinguishing it from sibling tools like google_search (general web search) and other travel-related tools.

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?

No guidance on when to use this tool versus alternatives (e.g., google_search for broader queries) or when not to use it. The description only states function, not context.

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

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

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