Skip to main content
Glama
Decodo

Decodo MCP Server

tiktok_shop_product

Read-only

Retrieve product data from TikTok Shop using a product ID. Supports headless rendering, device emulation, and country-specific requests.

Instructions

Scrape TikTok Shop Product page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYesTikTok Shop product ID (e.g., "1731541214379741272")
jsRenderNoShould the request be opened in a headless browser, false by default
deviceTypeNoDevice type to emulate for the request
countryNoCountry code for the request (e.g., US, GB, DE)

Implementation Reference

  • The handler function (lines 31-48) that executes the tool logic: it takes scraping params, sets the target to TIKTOK_SHOP_PRODUCT, calls sapiClient.scrape(), and returns the data as text content.
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.TIKTOK_SHOP_PRODUCT,
            markdown: true,
          } satisfies ScraperAPIParams;
    
          const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(data),
              },
            ],
          };
        }
      );
    };
  • Input schema definition for the tool, accepting product_id (string), jsRender, deviceType, and country.
    inputSchema: {
      product_id: z.string().describe('TikTok Shop product ID (e.g., "1731541214379741272")'),
      jsRender: zodJsRender,
      deviceType: zodDeviceType,
      country: zodCountry,
    },
  • Registration of the tool named 'tiktok_shop_product' on the MCP server via server.registerTool().
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'tiktok_shop_product',
        {
          description: 'Scrape TikTok Shop Product page',
          inputSchema: {
            product_id: z.string().describe('TikTok Shop product ID (e.g., "1731541214379741272")'),
            jsRender: zodJsRender,
            deviceType: zodDeviceType,
            country: zodCountry,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const params = {
            ...scrapingParams,
            target: SCRAPER_API_TARGETS.TIKTOK_SHOP_PRODUCT,
            markdown: true,
          } satisfies ScraperAPIParams;
    
          const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(data),
              },
            ],
          };
        }
      );
  • Tool instantiation (new TiktokShopProductTool()) in the allTools static array, which is later iterated over to register all tools.
    new TiktokShopProductTool(),
  • Constant definition SCRAPER_API_TARGETS.TIKTOK_SHOP_PRODUCT = 'tiktok_shop_product' used to set the API target.
    TIKTOK_SHOP_PRODUCT = 'tiktok_shop_product',
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds no additional behavioral context beyond 'Scrape', which is consistent but not informative.

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?

The description is a single, clear sentence with no redundancy. It is appropriately front-loaded and 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?

Given four parameters and no output schema, the description lacks detail on return format, limitations, or dynamic behavior. It is too brief to be fully useful for an AI agent.

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 description coverage is 100%, so parameters are already well-documented. The tool description does not add extra meaning beyond the schema; baseline score of 3 applies.

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 explicitly states the action (Scrape) and resource (TikTok Shop Product page). It distinguishes from siblings like tiktok_post and tiktok_shop_search by focusing on a single product page, but could be clearer about what data is extracted.

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 vs alternatives like tiktok_shop_search or tiktok_shop_url. There is no mention of prerequisites, context, or best practices.

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