Skip to main content
Glama
Decodo

Decodo MCP Server

walmart_search

Read-only

Scrape Walmart product search results with automatic parsing. Accepts query, device type, delivery ZIP, and store ID for localized output.

Instructions

Scrape Walmart Search results with automatic parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for Walmart products (e.g., "camping tent")
jsRenderNoShould the request be opened in a headless browser, false by default
deviceTypeNoDevice type to emulate for the request
deliveryZipNoZIP code for delivery location
storeIdNoWalmart store ID for local inventory

Implementation Reference

  • The async handler function that executes the Walmart Search tool logic. It takes scraping params, adds the WALMART_SEARCH target and markdown=true, calls sapiClient.scrape(), transforms the response, and returns text content.
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.WALMART_SEARCH,
            markdown: 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 on WalmartSearchTool that registers the tool with name 'walmart_search' including description, inputSchema (query, jsRender, deviceType, deliveryZip, storeId), annotations, and the async handler.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'walmart_search',
        {
          description: 'Scrape Walmart Search results with automatic parsing',
          inputSchema: {
            query: z.string().describe('Search query for Walmart products (e.g., "camping tent")'),
            jsRender: zodJsRender,
            deviceType: zodDeviceType,
            deliveryZip: zodDeliveryZip,
            storeId: zodWalmartStoreId,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.WALMART_SEARCH,
            markdown: 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 walmart_search: query (string), jsRender, deviceType, deliveryZip (optional string), storeId (optional string).
    inputSchema: {
      query: z.string().describe('Search query for Walmart products (e.g., "camping tent")'),
      jsRender: zodJsRender,
      deviceType: zodDeviceType,
      deliveryZip: zodDeliveryZip,
      storeId: zodWalmartStoreId,
    },
  • transformResponse helper that strips high-character-count fields ('suggested', 'refinements') from the scraped data to reduce response size.
    transformResponse = ({ data }: { data: object }) => {
      for (const fieldToRemove of WalmartSearchTool.FIELDS_WITH_HIGH_CHAR_COUNT) {
        data = removeKeyFromNestedObject({ obj: data, keyToRemove: fieldToRemove });
      }
    
      return { data: JSON.stringify(data) };
    };
  • WalmartSearchTool is instantiated in the allTools array and registered via registerTools()/registerAllTools() which calls tool.register() on the MCP server.
      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 'readOnlyHint: true' and 'openWorldHint: true' already cover safety and variability. The description adds minimal behavioral context beyond stating 'automatic parsing', which is useful but does not disclose details like return format, pagination, or error handling. Annotations carry the burden, so a moderate score is appropriate.

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 a single short sentence that conveys the core function efficiently. It is front-loaded and avoids fluff, though it could add slight details about output or usage without becoming verbose.

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?

With 5 parameters (including optional fields like deviceType, deliveryZip, storeId) and no output schema, the description is too brief. It does not explain what the parsed output looks like, how optional parameters affect results, or any usage tips. The tool is moderately complex, but the description only scratches the surface.

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 5 parameters have descriptions in the input schema (100% coverage), so the baseline is 3. The description does not add any extra meaning beyond the schema; it only repeats the tool's overall function. No parameter-specific elaboration is provided.

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 the action ('Scrape') and the resource ('Walmart Search results') and mentions 'with automatic parsing', which differentiates it from sibling tools like 'walmart_product' (single product) and 'amazon_search' (different retailer).

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 does not explicitly state when to use this tool versus alternatives like 'walmart_product' or other search tools. The usage context is only implied by the tool name and sibling list, lacking explicit guidance on prerequisites or exclusions.

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