Skip to main content
Glama
Decodo

Decodo MCP Server

walmart_product

Read-only

Retrieve parsed product details from Walmart by providing a product ID. Optionally enable JavaScript rendering, set delivery ZIP code, or specify store ID for local inventory.

Instructions

Scrape Walmart Product page with automatic parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYesWalmart product ID (e.g., "15296401808")
jsRenderNoShould the request be opened in a headless browser, false by default
deliveryZipNoZIP code for delivery location
storeIdNoWalmart store ID for local inventory

Implementation Reference

  • The anonymous async function inside registerTool() that executes the tool logic: builds params with target WALMART_PRODUCT, calls sapiClient.scrape(), applies transformResponse, and returns formatted content.
    async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
      const params = {
        ...scrapingParams,
        target: SCRAPER_API_TARGETS.WALMART_PRODUCT,
        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,
          },
        ],
      };
    }
  • The register() method of WalmartProductTool which calls server.registerTool with name 'walmart_product', inputSchema, and the handler function. This registers the tool on the MCP server.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'walmart_product',
        {
          description: 'Scrape Walmart Product page with automatic parsing',
          inputSchema: {
            product_id: z.string().describe('Walmart product ID (e.g., "15296401808")'),
            jsRender: zodJsRender,
            deliveryZip: zodDeliveryZip,
            storeId: zodStoreId,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.WALMART_PRODUCT,
            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 definition for walmart_product: product_id (required string), jsRender, deliveryZip (optional), storeId (optional).
    {
      description: 'Scrape Walmart Product page with automatic parsing',
      inputSchema: {
        product_id: z.string().describe('Walmart product ID (e.g., "15296401808")'),
        jsRender: zodJsRender,
        deliveryZip: zodDeliveryZip,
        storeId: zodStoreId,
      },
  • transformResponse method that strips high-char-count fields ('specifications', 'breadcrumbs') from the scraped data using removeKeyFromNestedObject, then stringifies the result.
    transformResponse = ({ data }: { data: object }) => {
      for (const fieldToRemove of WalmartProductTool.FIELDS_WITH_HIGH_CHAR_COUNT) {
        data = removeKeyFromNestedObject({ obj: data, keyToRemove: fieldToRemove });
      }
    
      return { data: JSON.stringify(data) };
    };
  • Instantiation of WalmartProductTool in the allTools array on ScraperAPIBaseServer - adds the tool to the list of available tools for registration.
    new WalmartProductTool(),
Behavior2/5

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

Annotations provide readOnlyHint and openWorldHint, which align with scraping. The description adds little beyond 'automatic parsing' – no mention of potential rate limits, cookies, or what happens with headless browser (jsRender). The description barely elaborates on the behavioral traits beyond what annotations already convey.

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

Conciseness3/5

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

The description is a single phrase, which is concise but lacks sentence structure. It front-loads the main action but omits any detail. Acceptable but not optimal.

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 optional parameters like jsRender and deliveryZip, the description is too sparse. It does not explain what 'automatic parsing' yields, nor does it cover return format. Without an output schema, the description should provide more context about the tool's capabilities.

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%, so the schema already describes each parameter. The description adds no extra meaning (e.g., that deliveryZip fetches local pricing, or that jsRender may slow response). Baseline 3 given high coverage.

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 tool name 'walmart_product' and description 'Scrape Walmart Product page with automatic parsing' clearly indicate the verb (scrape) and resource (Walmart product page). The required product_id parameter reinforces the purpose. However, it does not distinguish from sibling tools like walmart_search, and could specify the expected output (e.g., product details).

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., walmart_search for product discovery, amazon_product for Amazon). Does not mention prerequisites or scenarios where jsRender or deliveryZip should be set.

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