Skip to main content
Glama
Decodo

Decodo MCP Server

amazon_search

Read-only

Scrapes and parses Amazon search results automatically. Customize by location, domain, device, and pagination.

Instructions

Scrape Amazon Search results with automatic parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for Amazon products (e.g., "wireless keyboard")
geoNoGeolocation of the desired request, expressed as a country name
jsRenderNoShould the request be opened in a headless browser, false by default
domainNoAmazon domain (e.g., amazon.com, amazon.co.uk)
deviceTypeNoDevice type to emulate for the request
pageFromNoStarting page number for pagination

Implementation Reference

  • The core handler function for amazon_search tool. It constructs scraper API params with the AMAZON_SEARCH target and parse=true, calls the ScraperApiClient, transforms the response (removing high-char-count fields like 'suggested', 'amazons_choices', 'refinements'), and returns the result as text content.
    async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
      const params = {
        ...scrapingParams,
        target: SCRAPER_API_TARGETS.AMAZON_SEARCH,
        parse: true,
      } satisfies ScraperAPIParams;
    
      const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
      const { data: text } = this.transformResponse({ data });
    
      return {
        content: [
          {
            type: 'text',
            text,
          },
        ],
      };
    }
  • Input schema (validation/Zod definitions) for the amazon_search tool: query (required string), geo, jsRender, domain, deviceType, pageFrom (all optional). Defined inline within the register method.
    inputSchema: {
      query: z.string().describe('Search query for Amazon products (e.g., "wireless keyboard")'),
      geo: zodGeo,
      jsRender: zodJsRender,
      domain: zodDomain,
      deviceType: zodDeviceType,
      pageFrom: zodPageFrom,
    },
    annotations: {
      readOnlyHint: true,
      openWorldHint: true,
    },
  • Local Zod schemas for 'domain' (string) and 'pageFrom' (number), used in the input schema.
    const zodDomain = z
      .string()
      .describe('Amazon domain (e.g., amazon.com, amazon.co.uk)')
      .optional();
    
    const zodPageFrom = z
      .number()
      .describe('Starting page number for pagination')
      .optional();
  • Registration of the 'amazon_search' tool via server.registerTool() with the name, description, input schema (with annotations), and the handler callback.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'amazon_search',
        {
          description: 'Scrape Amazon Search results with automatic parsing',
          inputSchema: {
            query: z.string().describe('Search query for Amazon products (e.g., "wireless keyboard")'),
            geo: zodGeo,
            jsRender: zodJsRender,
            domain: zodDomain,
            deviceType: zodDeviceType,
            pageFrom: zodPageFrom,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.AMAZON_SEARCH,
            parse: true,
          } satisfies ScraperAPIParams;
    
          const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
          const { data: text } = this.transformResponse({ data });
    
          return {
            content: [
              {
                type: 'text',
                text,
              },
            ],
          };
        }
      );
    };
  • Registration of AmazonSearchTool in the static allTools array on the ScraperAPIBaseServer class, which is iterated during tool registration.
    static allTools: Tool[] = [
      new ScrapeAsMarkdownTool(),
      new ScreenshotTool(),
      new GoogleSearchTool(),
      new GoogleAdsTool(),
      new GoogleLensTool(),
      new GoogleAiModeTool(),
      new GoogleTravelHotelsTool(),
      new AmazonSearchTool(),
      new AmazonProductTool(),
      new AmazonPricingTool(),
      new AmazonSellersTool(),
      new AmazonBestsellersTool(),
      new WalmartSearchTool(),
      new WalmartProductTool(),
      new TargetSearchTool(),
      new TargetProductTool(),
      new TiktokPostTool(),
      new TiktokShopSearchTool(),
      new TiktokShopProductTool(),
      new TiktokShopUrlTool(),
      new YoutubeMetadataTool(),
      new YoutubeChannelTool(),
      new YoutubeSubtitlesTool(),
      new YoutubeSearchTool(),
      new RedditPostTool(),
      new RedditSubredditTool(),
      new RedditUserTool(),
      new BingSearchTool(),
      new ChatGPTTool(),
      new PerplexityTool(),
    ];
Behavior3/5

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

Annotations already indicate readOnlyHint=true (safe read) and openWorldHint=true (results may vary). The description adds 'automatic parsing' but does not explain pagination, rate limits, or return format. No contradiction with annotations.

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 very concise at 5 words, front-loaded with the core action. However, 'with automatic parsing' is vague and could be replaced with more specific information without losing conciseness.

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 tool with 6 parameters and no output schema, the description is too minimal. It does not explain what data is returned, how pagination works, or specify that results are from Amazon. Given sibling tools, more context on return format would be helpful.

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 6 parameters described in the input schema. The description does not add any parameter-specific context beyond what the schema provides. Baseline score of 3 applies.

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 clearly states it scrapes Amazon search results with automatic parsing. It distinguishes from siblings like amazon_product (single product) and amazon_bestsellers (bestsellers list) by specifying 'search results'.

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 use for Amazon search queries but does not explicitly state when to use this tool over alternatives (e.g., amazon_product for specific items, google_search for general web search). No exclusions or prerequisites are mentioned.

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