Skip to main content
Glama
isnow890

Naver Search MCP Server

datalab_shopping_by_device

Analyze shopping trends on Naver by device type (PC or mobile) to identify user behavior patterns and optimize marketing strategies over specific time periods.

Instructions

Perform a trend analysis on Naver Shopping by device. (네이버 쇼핑 기기별 트렌드 분석)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory code
deviceYesDevice type
endDateYesEnd date (yyyy-mm-dd)
startDateYesStart date (yyyy-mm-dd)
timeUnitYesTime unit

Implementation Reference

  • Handler function that takes DatalabShoppingDevice parameters, maps them, and delegates to the NaverSearchClient's datalabShoppingByDevice method to fetch shopping trends by device.
    /**
     * 쇼핑 기기별 트렌드 핸들러
     * 네이버 데이터랩 쇼핑 기기별 트렌드 분석 API 호출
     * @param params DatalabShoppingDevice
     */
    export async function handleShoppingByDeviceTrend(
      params: DatalabShoppingDevice
    ) {
      return client.datalabShoppingByDevice({
        startDate: params.startDate,
        endDate: params.endDate,
        timeUnit: params.timeUnit,
        category: params.category,
        device: params.device,
      });
    }
  • Zod input schema for the datalab_shopping_by_device tool, extending base schema with category code and device (pc/mo).
    export const DatalabShoppingDeviceSchema = DatalabBaseSchema.extend({
      category: z.string().describe("Category code"),
      device: z.enum(["pc", "mo"]).describe("Device type"),
    });
  • src/index.ts:298-317 (registration)
    MCP server registration of the 'datalab_shopping_by_device' tool, specifying description, input schema (subset of DatalabShoppingDeviceSchema), and async handler that calls datalabToolHandlers and formats response.
    server.registerTool(
      "datalab_shopping_by_device",
      {
        description:
          "📱 Analyze shopping trends by device (PC vs Mobile). Use find_category first. BUSINESS CASES: Mobile commerce strategy, responsive design priority, device-specific campaigns. EXAMPLE: 'PC 사용자가 더 많이 구매하는 카테고리는?' For current device trends, use get_current_korean_time to set proper analysis period. (기기별 쇼핑 트렌드 분석 - 먼저 find_category 도구로 카테고리 코드를 찾고, 현재 기기 트렌드 분석시 get_current_korean_time으로 적절한 분석 기간 설정)",
        inputSchema: DatalabShoppingDeviceSchema.pick({
          startDate: true,
          endDate: true,
          timeUnit: true,
          category: true,
          device: true,
        }).shape,
      },
      async (args) => {
        const result = await datalabToolHandlers.datalab_shopping_by_device(args);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • NaverSearchClient method that performs the HTTP POST request to Naver DataLab API endpoint for shopping category trends by device.
     */
    async datalabShoppingByDevice(
      params: DatalabShoppingDeviceRequest
    ): Promise<DatalabShoppingResponse> {
      return this.post(`${this.datalabBaseUrl}/shopping/category/device`, params);
    }
  • Internal handler map registration in datalabToolHandlers object that logs args and calls the specific handleShoppingByDeviceTrend function.
    datalab_shopping_by_device: (args) => {
      console.error("datalab_shopping_by_device called with args:", JSON.stringify(args, null, 2));
      return handleShoppingByDeviceTrend(args);

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/isnow890/naver-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server