Skip to main content
Glama

datalab_shopping_by_age

Analyze Naver Shopping trends by age group, category, and time period to identify purchasing patterns and consumer preferences for targeted insights.

Instructions

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

Input Schema

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

Implementation Reference

  • Core handler function that processes the tool arguments and delegates to the NaverSearchClient's datalabShoppingByAge method
    export async function handleShoppingByAgeTrend(params: DatalabShoppingAge) { return client.datalabShoppingByAge({ startDate: params.startDate, endDate: params.endDate, timeUnit: params.timeUnit, category: params.category, ages: params.ages, }); }
  • Zod schema defining the input parameters for the datalab_shopping_by_age tool: category code and array of age groups (10-60) on top of base dates and timeUnit
    export const DatalabShoppingAgeSchema = DatalabBaseSchema.extend({ category: z.string().describe("Category code"), ages: z .array(z.enum(["10", "20", "30", "40", "50", "60"])) .describe("Age groups"), });
  • src/index.ts:340-359 (registration)
    MCP server tool registration including name, description, inputSchema (derived from DatalabShoppingAgeSchema), and handler dispatcher to datalabToolHandlers
    server.registerTool( "datalab_shopping_by_age", { description: "👶👦👨👴 Analyze shopping trends by age groups (10s, 20s, 30s, 40s, 50s, 60s+). Use find_category first. BUSINESS CASES: Age-targeted products, generational preferences, lifecycle marketing. EXAMPLE: '개발 도구는 어느 연령대가 많이 구매하나?' For current age trends, use get_current_korean_time to set proper analysis period. (연령별 쇼핑 트렌드 - 먼저 find_category 도구로 카테고리 코드를 찾고, 현재 연령 트렌드 분석시 get_current_korean_time으로 적절한 분석 기간 설정)", inputSchema: DatalabShoppingAgeSchema.pick({ startDate: true, endDate: true, timeUnit: true, category: true, ages: true, }).shape, }, async (args) => { const result = await datalabToolHandlers.datalab_shopping_by_age(args); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );
  • NaverSearchClient method that performs the actual POST request to Naver Datalab API endpoint for shopping trends by age
    async datalabShoppingByAge( params: DatalabShoppingAgeRequest ): Promise<DatalabShoppingResponse> { return this.post(`${this.datalabBaseUrl}/shopping/category/age`, params); }
  • Dispatcher entry in datalabToolHandlers map that logs args and calls the core handleShoppingByAgeTrend function
    datalab_shopping_by_age: (args) => { console.error("datalab_shopping_by_age called with args:", JSON.stringify(args, null, 2)); return handleShoppingByAgeTrend(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