Skip to main content
Glama
Decodo

Decodo MCP Server

amazon_pricing

Read-only

Scrape Amazon product pricing by ASIN and automatically parse results. Supports multiple domains, device types, geolocation, and pagination.

Instructions

Scrape Amazon Product pricing information with automatic parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesAmazon product ASIN (e.g., "B09H74FXNW")
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
geoNoAmazon geo location (e.g., 10001 for US ZIP code)

Implementation Reference

  • The async handler function that executes the Amazon pricing scrape. It builds params with target 'amazon_pricing', calls sapiClient.scrape(), transforms the response (removing 'seller_link' fields), and returns the result as text content.
    async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
      const params = {
        ...scrapingParams,
        target: SCRAPER_API_TARGETS.AMAZON_PRICING,
        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 for the amazon_pricing tool: requires query (ASIN string), optional jsRender, domain, deviceType, pageFrom, and geo fields.
    description: 'Scrape Amazon Product pricing information with automatic parsing',
    inputSchema: {
      query: z.string().describe('Amazon product ASIN (e.g., "B09H74FXNW")'),
      jsRender: zodJsRender,
      domain: zodDomain,
      deviceType: zodDeviceType,
      pageFrom: zodPageFrom,
      geo: zodGeo,
    },
  • Registration call to server.registerTool('amazon_pricing', ...) with the description, inputSchema, annotations, and handler callback.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'amazon_pricing',
        {
          description: 'Scrape Amazon Product pricing information with automatic parsing',
          inputSchema: {
            query: z.string().describe('Amazon product ASIN (e.g., "B09H74FXNW")'),
            jsRender: zodJsRender,
            domain: zodDomain,
            deviceType: zodDeviceType,
            pageFrom: zodPageFrom,
            geo: zodGeo,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.AMAZON_PRICING,
            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,
              },
            ],
          };
        }
      );
    };
  • registerAllTools() iterates all tools in allTools (including AmazonPricingTool) and calls tool.register().
    registerAllTools() {
      for (const tool of ScraperAPIBaseServer.allTools) {
        tool.register({ server: this.server, sapiClient: this.sapiClient, auth: this.auth });
      }
    }
  • transformResponse helper that removes seller_link fields (high character count) from the scraped data using removeKeyFromNestedObject utility.
    transformResponse = ({ data }: { data: object }) => {
      for (const fieldToRemove of AmazonPricingTool.FIELDS_WITH_HIGH_CHAR_COUNT) {
        data = removeKeyFromNestedObject({ obj: data, keyToRemove: fieldToRemove });
      }
    
      return { data: JSON.stringify(data) };
    };
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds 'automatic parsing' but does not disclose how parsing works, error behavior, or other traits beyond what annotations provide. 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?

Single sentence is concise and front-loaded with the core action. However, it could be slightly expanded without losing conciseness to include context like 'use ASIN for query'.

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 the 100% schema coverage and annotations indicating safe read and open-world, the description is adequate but minimal. With 6 parameters, the one-line description leaves many nuances unaddressed (e.g., necessity of domain, effect of jsRender).

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?

All 6 parameters are documented with descriptions in the schema (100% coverage). The description adds no parameter-specific information beyond the schema, so baseline score of 3 is appropriate.

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 'scrape' and resource 'Amazon Product pricing information', with 'automatic parsing' indicating added processing. However, it does not differentiate from sibling tools like 'amazon_product' or 'amazon_search', which may also return pricing data.

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 is provided on when to use this tool versus alternatives, such as 'amazon_product' for full product details or 'amazon_search' for finding products. 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