@isnow890/naver-search-mcp 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +35 -25
  2. package/dist/ref/naver-search-mcp-fixed-main/package.json +39 -0
  3. package/dist/ref/naver-search-mcp-fixed-main/src/clients/naver-api-core.client.d.ts +11 -0
  4. package/dist/ref/naver-search-mcp-fixed-main/src/clients/naver-api-core.client.js +30 -0
  5. package/dist/ref/naver-search-mcp-fixed-main/src/clients/naver-search.client.d.ts +70 -0
  6. package/dist/ref/naver-search-mcp-fixed-main/src/clients/naver-search.client.js +100 -0
  7. package/dist/ref/naver-search-mcp-fixed-main/src/handlers/datalab.handlers.d.ts +61 -0
  8. package/dist/ref/naver-search-mcp-fixed-main/src/handlers/datalab.handlers.js +137 -0
  9. package/dist/ref/naver-search-mcp-fixed-main/src/handlers/search.handlers.d.ts +44 -0
  10. package/dist/ref/naver-search-mcp-fixed-main/src/handlers/search.handlers.js +81 -0
  11. package/dist/ref/naver-search-mcp-fixed-main/src/index.d.ts +2 -0
  12. package/dist/ref/naver-search-mcp-fixed-main/src/index.js +122 -0
  13. package/dist/ref/naver-search-mcp-fixed-main/src/schemas/datalab.schemas.d.ts +336 -0
  14. package/dist/ref/naver-search-mcp-fixed-main/src/schemas/datalab.schemas.js +103 -0
  15. package/dist/ref/naver-search-mcp-fixed-main/src/schemas/search.schemas.d.ts +80 -0
  16. package/dist/ref/naver-search-mcp-fixed-main/src/schemas/search.schemas.js +62 -0
  17. package/dist/ref/naver-search-mcp-fixed-main/src/tools/datalab.tools.d.ts +13 -0
  18. package/dist/ref/naver-search-mcp-fixed-main/src/tools/datalab.tools.js +70 -0
  19. package/dist/ref/naver-search-mcp-fixed-main/src/tools/search.tools.d.ts +13 -0
  20. package/dist/ref/naver-search-mcp-fixed-main/src/tools/search.tools.js +62 -0
  21. package/dist/ref/naver-search-mcp-fixed-main/src/types/datalab.types.d.ts +78 -0
  22. package/dist/ref/naver-search-mcp-fixed-main/src/types/datalab.types.js +1 -0
  23. package/dist/ref/naver-search-mcp-fixed-main/src/types/search.types.d.ts +44 -0
  24. package/dist/ref/naver-search-mcp-fixed-main/src/types/search.types.js +1 -0
  25. package/dist/src/clients/naver-api-core.client.d.ts +17 -0
  26. package/dist/src/clients/naver-api-core.client.js +32 -4
  27. package/dist/src/clients/naver-search.client.d.ts +78 -0
  28. package/dist/src/clients/naver-search.client.js +17 -0
  29. package/dist/src/handlers/category.handlers.d.ts +9 -0
  30. package/dist/src/handlers/category.handlers.js +26 -12
  31. package/dist/src/handlers/datalab.handlers.d.ts +61 -0
  32. package/dist/src/handlers/search.handlers.d.ts +44 -0
  33. package/dist/src/handlers/time.handlers.d.ts +11 -0
  34. package/dist/src/index.d.ts +43 -0
  35. package/dist/src/index.js +39 -1
  36. package/dist/src/schemas/category.schemas.d.ts +11 -0
  37. package/dist/src/schemas/datalab.schemas.d.ts +336 -0
  38. package/dist/src/schemas/search.schemas.d.ts +80 -0
  39. package/dist/src/schemas/time.schemas.d.ts +6 -0
  40. package/dist/src/types/datalab.types.d.ts +78 -0
  41. package/dist/src/types/search.types.d.ts +44 -0
  42. package/dist/src/types/time.types.d.ts +13 -0
  43. package/dist/src/utils/memory-manager.d.ts +87 -0
  44. package/dist/src/utils/memory-manager.js +211 -0
  45. package/package.json +1 -1
package/README.md CHANGED
@@ -200,32 +200,9 @@ datalab_shopping_keywords → "home workout" vs "gym" trend analysis
200
200
 
201
201
  ## Installation
202
202
 
203
- ### Method 1: Smithery Installation (Recommended)
203
+ ### Method 1: NPX Installation (Recommended)
204
204
 
205
- The easiest way to use this MCP server is through Smithery.
206
-
207
- #### For Claude Desktop:
208
-
209
- ```bash
210
- npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client claude
211
- ```
212
-
213
- #### For other AI clients:
214
-
215
- ```bash
216
- # Cursor
217
- npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client cursor
218
-
219
- # Windsurf
220
- npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client windsurf
221
-
222
- # Cline
223
- npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client cline
224
- ```
225
-
226
- ### Method 2: NPX Installation
227
-
228
- Alternatively, you can use NPX installation. For detailed package information, see the [NPM package page](https://www.npmjs.com/package/@isnow890/naver-search-mcp).
205
+ The most reliable way to use this MCP server is through direct NPX installation. For detailed package information, see the [NPM package page](https://www.npmjs.com/package/@isnow890/naver-search-mcp).
229
206
 
230
207
  #### Claude Desktop Configuration
231
208
 
@@ -265,6 +242,39 @@ Add to `mcp.json`:
265
242
  }
266
243
  ```
267
244
 
245
+ ### Method 2: Smithery Installation (Alternative - Known Issues)
246
+
247
+ ⚠️ **Important Notice**: Smithery installation may experience connection timeouts and hanging issues due to WebSocket relay infrastructure problems. This is a known Smithery platform issue, not a problem with this MCP server code. **NPX installation (Method 1) is strongly recommended for reliable operation.**
248
+
249
+ #### Known Issues with Smithery:
250
+ - Server initialization hangs or times out
251
+ - `Error -32001: Request timed out`
252
+ - WebSocket connection drops after handshake
253
+ - Server shuts down unexpectedly before processing requests
254
+
255
+ #### If you still want to try Smithery:
256
+
257
+ ##### For Claude Desktop:
258
+
259
+ ```bash
260
+ npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client claude
261
+ ```
262
+
263
+ ##### For other AI clients:
264
+
265
+ ```bash
266
+ # Cursor
267
+ npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client cursor
268
+
269
+ # Windsurf
270
+ npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client windsurf
271
+
272
+ # Cline
273
+ npx -y @smithery/cli@latest install @isnow890/naver-search-mcp --client cline
274
+ ```
275
+
276
+ **If you experience timeout issues with Smithery, please switch to Method 1 (NPX) for stable operation.**
277
+
268
278
  ### Method 3: Local Installation
269
279
 
270
280
  For local development or custom modifications:
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@d429/naver-search-mcp-fixed",
3
+ "version": "1.0.0",
4
+ "description": "Fixed version of Naver Search MCP Server with missing MCP protocol handlers",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "prebuild": "shx rm -rf dist",
12
+ "build": "tsc",
13
+ "prepare": "npm run build",
14
+ "watch": "tsc --watch",
15
+ "start": "node dist/src/index.js"
16
+ },
17
+ "engines": {
18
+ "node": ">=18"
19
+ },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "1.10.2",
22
+ "axios": "^1.6.7",
23
+ "zod": "^3.22.4",
24
+ "zod-to-json-schema": "^3.23.5",
25
+ "sharp": "^0.33.2",
26
+ "dotenv": "^16.4.5"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^22",
30
+ "shx": "^0.3.4",
31
+ "typescript": "^5.3.3"
32
+ },
33
+ "author": "Daewon Kim <d429@learningcourt.com>",
34
+ "license": "MIT",
35
+ "bin": {
36
+ "naver-search-mcp": "dist/src/index.js"
37
+ },
38
+ "type": "module"
39
+ }
@@ -0,0 +1,11 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ import { NaverSearchConfig } from "../schemas/search.schemas.js";
3
+ export declare abstract class NaverApiCoreClient {
4
+ protected searchBaseUrl: string;
5
+ protected datalabBaseUrl: string;
6
+ protected config: NaverSearchConfig | null;
7
+ initialize(config: NaverSearchConfig): void;
8
+ protected getHeaders(contentType?: string): AxiosRequestConfig;
9
+ protected get<T>(url: string, params: any): Promise<T>;
10
+ protected post<T>(url: string, data: any): Promise<T>;
11
+ }
@@ -0,0 +1,30 @@
1
+ import axios from "axios";
2
+ export class NaverApiCoreClient {
3
+ constructor() {
4
+ this.searchBaseUrl = "https://openapi.naver.com/v1/search";
5
+ this.datalabBaseUrl = "https://openapi.naver.com/v1/datalab";
6
+ this.config = null;
7
+ }
8
+ initialize(config) {
9
+ this.config = config;
10
+ }
11
+ getHeaders(contentType = "application/json") {
12
+ if (!this.config)
13
+ throw new Error("NaverApiCoreClient is not initialized.");
14
+ return {
15
+ headers: {
16
+ "X-Naver-Client-Id": this.config.clientId,
17
+ "X-Naver-Client-Secret": this.config.clientSecret,
18
+ "Content-Type": contentType,
19
+ },
20
+ };
21
+ }
22
+ async get(url, params) {
23
+ const response = await axios.get(url, { params, ...this.getHeaders() });
24
+ return response.data;
25
+ }
26
+ async post(url, data) {
27
+ const response = await axios.post(url, data, this.getHeaders());
28
+ return response.data;
29
+ }
30
+ }
@@ -0,0 +1,70 @@
1
+ import { NaverApiCoreClient } from "./naver-api-core.client.js";
2
+ import { NaverSearchType, NaverSearchConfig, NaverLocalSearchParams, NaverDocumentSearchParams, SearchArgs } from "../schemas/search.schemas.js";
3
+ import { NaverDocumentSearchResponse, NaverLocalSearchResponse } from "../types/search.types.js";
4
+ import { DatalabSearchRequest, DatalabShoppingResponse, DatalabShoppingCategoryRequest, DatalabShoppingDeviceRequest, DatalabShoppingGenderRequest, DatalabShoppingAgeRequest, DatalabShoppingKeywordsRequest, DatalabShoppingKeywordRequest } from "../types/datalab.types.js";
5
+ /**
6
+ * NaverSearchClient - 네이버 API 서비스를 위한 싱글톤 클라이언트
7
+ * 검색, 데이터랩 API 요청 처리
8
+ */
9
+ export declare class NaverSearchClient extends NaverApiCoreClient {
10
+ private static instance;
11
+ private constructor();
12
+ /**
13
+ * 싱글톤 인스턴스 반환
14
+ */
15
+ static getInstance(): NaverSearchClient;
16
+ /**
17
+ * API 자격 증명으로 클라이언트 초기화
18
+ */
19
+ initialize(config: NaverSearchConfig): void;
20
+ /**
21
+ * 네이버 검색 API 호출 (type별로)
22
+ * @param type 검색 타입(카테고리)
23
+ * @param params 검색 파라미터
24
+ */
25
+ search(type: NaverSearchType, params: SearchArgs): Promise<any>;
26
+ /**
27
+ * 전문자료 검색 메서드
28
+ */
29
+ searchAcademic(params: NaverDocumentSearchParams): Promise<NaverDocumentSearchResponse>;
30
+ /**
31
+ * 지역 검색 메서드
32
+ */
33
+ searchLocal(params: NaverLocalSearchParams): Promise<NaverLocalSearchResponse>;
34
+ /**
35
+ * 검색어 트렌드 분석 메서드
36
+ */
37
+ searchTrend(params: DatalabSearchRequest): Promise<any>;
38
+ /**
39
+ * 쇼핑 카테고리 트렌드 분석 메서드
40
+ */
41
+ datalabShoppingCategory(params: DatalabShoppingCategoryRequest): Promise<DatalabShoppingResponse>;
42
+ /**
43
+ * 쇼핑 기기별 트렌드 분석 메서드
44
+ */
45
+ datalabShoppingByDevice(params: DatalabShoppingDeviceRequest): Promise<DatalabShoppingResponse>;
46
+ /**
47
+ * 쇼핑 성별 트렌드 분석 메서드
48
+ */
49
+ datalabShoppingByGender(params: DatalabShoppingGenderRequest): Promise<DatalabShoppingResponse>;
50
+ /**
51
+ * 쇼핑 연령별 트렌드 분석 메서드
52
+ */
53
+ datalabShoppingByAge(params: DatalabShoppingAgeRequest): Promise<DatalabShoppingResponse>;
54
+ /**
55
+ * 쇼핑 키워드 트렌드 분석 메서드
56
+ */
57
+ datalabShoppingKeywords(params: DatalabShoppingKeywordsRequest): Promise<DatalabShoppingResponse>;
58
+ /**
59
+ * 쇼핑 키워드 기기별 트렌드 분석 메서드
60
+ */
61
+ datalabShoppingKeywordByDevice(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
62
+ /**
63
+ * 쇼핑 키워드 성별 트렌드 분석 메서드
64
+ */
65
+ datalabShoppingKeywordByGender(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
66
+ /**
67
+ * 쇼핑 키워드 연령별 트렌드 분석 메서드
68
+ */
69
+ datalabShoppingKeywordByAge(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
70
+ }
@@ -0,0 +1,100 @@
1
+ import { NaverApiCoreClient } from "./naver-api-core.client.js";
2
+ /**
3
+ * NaverSearchClient - 네이버 API 서비스를 위한 싱글톤 클라이언트
4
+ * 검색, 데이터랩 API 요청 처리
5
+ */
6
+ export class NaverSearchClient extends NaverApiCoreClient {
7
+ constructor() {
8
+ super();
9
+ }
10
+ /**
11
+ * 싱글톤 인스턴스 반환
12
+ */
13
+ static getInstance() {
14
+ if (!NaverSearchClient.instance) {
15
+ NaverSearchClient.instance = new NaverSearchClient();
16
+ }
17
+ return NaverSearchClient.instance;
18
+ }
19
+ /**
20
+ * API 자격 증명으로 클라이언트 초기화
21
+ */
22
+ initialize(config) {
23
+ this.config = config;
24
+ }
25
+ /**
26
+ * 네이버 검색 API 호출 (type별로)
27
+ * @param type 검색 타입(카테고리)
28
+ * @param params 검색 파라미터
29
+ */
30
+ async search(type, params) {
31
+ return this.get(`${this.searchBaseUrl}/${type}`, params);
32
+ }
33
+ /**
34
+ * 전문자료 검색 메서드
35
+ */
36
+ async searchAcademic(params) {
37
+ return this.get(`${this.searchBaseUrl}/doc`, params);
38
+ }
39
+ /**
40
+ * 지역 검색 메서드
41
+ */
42
+ async searchLocal(params) {
43
+ return this.get(`${this.searchBaseUrl}/local`, params);
44
+ }
45
+ /**
46
+ * 검색어 트렌드 분석 메서드
47
+ */
48
+ async searchTrend(params) {
49
+ return this.post(`${this.datalabBaseUrl}/search`, params);
50
+ }
51
+ /**
52
+ * 쇼핑 카테고리 트렌드 분석 메서드
53
+ */
54
+ async datalabShoppingCategory(params) {
55
+ return this.post(`${this.datalabBaseUrl}/shopping/categories`, params);
56
+ }
57
+ /**
58
+ * 쇼핑 기기별 트렌드 분석 메서드
59
+ */
60
+ async datalabShoppingByDevice(params) {
61
+ return this.post(`${this.datalabBaseUrl}/shopping/category/device`, params);
62
+ }
63
+ /**
64
+ * 쇼핑 성별 트렌드 분석 메서드
65
+ */
66
+ async datalabShoppingByGender(params) {
67
+ return this.post(`${this.datalabBaseUrl}/shopping/category/gender`, params);
68
+ }
69
+ /**
70
+ * 쇼핑 연령별 트렌드 분석 메서드
71
+ */
72
+ async datalabShoppingByAge(params) {
73
+ return this.post(`${this.datalabBaseUrl}/shopping/category/age`, params);
74
+ }
75
+ /**
76
+ * 쇼핑 키워드 트렌드 분석 메서드
77
+ */
78
+ async datalabShoppingKeywords(params) {
79
+ return this.post(`${this.datalabBaseUrl}/shopping/category/keywords`, params);
80
+ }
81
+ /**
82
+ * 쇼핑 키워드 기기별 트렌드 분석 메서드
83
+ */
84
+ async datalabShoppingKeywordByDevice(params) {
85
+ return this.post(`${this.datalabBaseUrl}/shopping/category/keyword/device`, params);
86
+ }
87
+ /**
88
+ * 쇼핑 키워드 성별 트렌드 분석 메서드
89
+ */
90
+ async datalabShoppingKeywordByGender(params) {
91
+ return this.post(`${this.datalabBaseUrl}/shopping/category/keyword/gender`, params);
92
+ }
93
+ /**
94
+ * 쇼핑 키워드 연령별 트렌드 분석 메서드
95
+ */
96
+ async datalabShoppingKeywordByAge(params) {
97
+ return this.post(`${this.datalabBaseUrl}/shopping/category/keyword/age`, params);
98
+ }
99
+ }
100
+ NaverSearchClient.instance = null;
@@ -0,0 +1,61 @@
1
+ import { DatalabSearch, DatalabShopping, DatalabShoppingDevice, DatalabShoppingGender, DatalabShoppingAge, DatalabShoppingKeywords, DatalabShoppingKeywordDevice, DatalabShoppingKeywordGender, DatalabShoppingKeywordAge } from "../schemas/datalab.schemas.js";
2
+ /**
3
+ * 데이터랩 도구 핸들러 맵
4
+ * 각 도구 이름을 키로, 실행할 핸들러 함수를 값으로 가짐
5
+ * index.ts에서 도구 실행 분기 없이 바로 사용
6
+ */
7
+ export declare const datalabToolHandlers: Record<string, (args: any) => Promise<any>>;
8
+ /**
9
+ * 검색어 트렌드 핸들러
10
+ * 네이버 데이터랩 검색어 트렌드 분석 API 호출
11
+ * @param params DatalabSearch
12
+ */
13
+ export declare function handleSearchTrend(params: DatalabSearch): Promise<any>;
14
+ /**
15
+ * 쇼핑 카테고리 트렌드 핸들러
16
+ * 네이버 데이터랩 쇼핑 카테고리별 트렌드 분석 API 호출
17
+ * @param params DatalabShopping
18
+ */
19
+ export declare function handleShoppingCategoryTrend(params: DatalabShopping): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
20
+ /**
21
+ * 쇼핑 기기별 트렌드 핸들러
22
+ * 네이버 데이터랩 쇼핑 기기별 트렌드 분석 API 호출
23
+ * @param params DatalabShoppingDevice
24
+ */
25
+ export declare function handleShoppingByDeviceTrend(params: DatalabShoppingDevice): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
26
+ /**
27
+ * 쇼핑 성별 트렌드 핸들러
28
+ * 네이버 데이터랩 쇼핑 성별 트렌드 분석 API 호출
29
+ * @param params DatalabShoppingGender
30
+ */
31
+ export declare function handleShoppingByGenderTrend(params: DatalabShoppingGender): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
32
+ /**
33
+ * 쇼핑 연령별 트렌드 핸들러
34
+ * 네이버 데이터랩 쇼핑 연령별 트렌드 분석 API 호출
35
+ * @param params DatalabShoppingAge
36
+ */
37
+ export declare function handleShoppingByAgeTrend(params: DatalabShoppingAge): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
38
+ /**
39
+ * 쇼핑 키워드 트렌드 핸들러 (복수 키워드 그룹 지원)
40
+ * 네이버 데이터랩 쇼핑 키워드 그룹 트렌드 분석 API 호출
41
+ * @param params DatalabShoppingKeywords
42
+ */
43
+ export declare function handleShoppingKeywordsTrend(params: DatalabShoppingKeywords): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
44
+ /**
45
+ * 쇼핑 키워드 기기별 트렌드 핸들러
46
+ * 네이버 데이터랩 쇼핑 키워드 기기별 트렌드 분석 API 호출
47
+ * @param params DatalabShoppingKeywordDevice
48
+ */
49
+ export declare function handleShoppingKeywordByDeviceTrend(params: DatalabShoppingKeywordDevice): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
50
+ /**
51
+ * 쇼핑 키워드 성별 트렌드 핸들러
52
+ * 네이버 데이터랩 쇼핑 키워드 성별 트렌드 분석 API 호출
53
+ * @param params DatalabShoppingKeywordGender
54
+ */
55
+ export declare function handleShoppingKeywordByGenderTrend(params: DatalabShoppingKeywordGender): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
56
+ /**
57
+ * 쇼핑 키워드 연령별 트렌드 핸들러
58
+ * 네이버 데이터랩 쇼핑 키워드 연령별 트렌드 분석 API 호출
59
+ * @param params DatalabShoppingKeywordAge
60
+ */
61
+ export declare function handleShoppingKeywordByAgeTrend(params: DatalabShoppingKeywordAge): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
@@ -0,0 +1,137 @@
1
+ import { NaverSearchClient } from "../clients/naver-search.client.js";
2
+ // 클라이언트 인스턴스 (싱글톤)
3
+ const client = NaverSearchClient.getInstance();
4
+ /**
5
+ * 데이터랩 도구 핸들러 맵
6
+ * 각 도구 이름을 키로, 실행할 핸들러 함수를 값으로 가짐
7
+ * index.ts에서 도구 실행 분기 없이 바로 사용
8
+ */
9
+ export const datalabToolHandlers = {
10
+ datalab_search: (args) => handleSearchTrend(args), // 검색어 트렌드 분석
11
+ datalab_shopping_category: (args) => handleShoppingCategoryTrend(args), // 쇼핑 카테고리별 트렌드
12
+ datalab_shopping_by_device: (args) => handleShoppingByDeviceTrend(args), // 쇼핑 기기별 트렌드
13
+ datalab_shopping_by_gender: (args) => handleShoppingByGenderTrend(args), // 쇼핑 성별 트렌드
14
+ datalab_shopping_by_age: (args) => handleShoppingByAgeTrend(args), // 쇼핑 연령별 트렌드
15
+ datalab_shopping_keywords: (args) => handleShoppingKeywordsTrend(args), // 쇼핑 키워드 그룹 트렌드
16
+ datalab_shopping_keyword_by_device: (args) => handleShoppingKeywordByDeviceTrend(args), // 쇼핑 키워드 기기별 트렌드
17
+ datalab_shopping_keyword_by_gender: (args) => handleShoppingKeywordByGenderTrend(args), // 쇼핑 키워드 성별 트렌드
18
+ datalab_shopping_keyword_by_age: (args) => handleShoppingKeywordByAgeTrend(args), // 쇼핑 키워드 연령별 트렌드
19
+ };
20
+ /**
21
+ * 검색어 트렌드 핸들러
22
+ * 네이버 데이터랩 검색어 트렌드 분석 API 호출
23
+ * @param params DatalabSearch
24
+ */
25
+ export async function handleSearchTrend(params) {
26
+ return client.searchTrend(params);
27
+ }
28
+ /**
29
+ * 쇼핑 카테고리 트렌드 핸들러
30
+ * 네이버 데이터랩 쇼핑 카테고리별 트렌드 분석 API 호출
31
+ * @param params DatalabShopping
32
+ */
33
+ export async function handleShoppingCategoryTrend(params) {
34
+ return client.datalabShoppingCategory(params);
35
+ }
36
+ /**
37
+ * 쇼핑 기기별 트렌드 핸들러
38
+ * 네이버 데이터랩 쇼핑 기기별 트렌드 분석 API 호출
39
+ * @param params DatalabShoppingDevice
40
+ */
41
+ export async function handleShoppingByDeviceTrend(params) {
42
+ return client.datalabShoppingByDevice({
43
+ startDate: params.startDate,
44
+ endDate: params.endDate,
45
+ timeUnit: params.timeUnit,
46
+ category: params.category,
47
+ device: params.device,
48
+ });
49
+ }
50
+ /**
51
+ * 쇼핑 성별 트렌드 핸들러
52
+ * 네이버 데이터랩 쇼핑 성별 트렌드 분석 API 호출
53
+ * @param params DatalabShoppingGender
54
+ */
55
+ export async function handleShoppingByGenderTrend(params) {
56
+ return client.datalabShoppingByGender({
57
+ startDate: params.startDate,
58
+ endDate: params.endDate,
59
+ timeUnit: params.timeUnit,
60
+ category: params.category,
61
+ gender: params.gender,
62
+ });
63
+ }
64
+ /**
65
+ * 쇼핑 연령별 트렌드 핸들러
66
+ * 네이버 데이터랩 쇼핑 연령별 트렌드 분석 API 호출
67
+ * @param params DatalabShoppingAge
68
+ */
69
+ export async function handleShoppingByAgeTrend(params) {
70
+ return client.datalabShoppingByAge({
71
+ startDate: params.startDate,
72
+ endDate: params.endDate,
73
+ timeUnit: params.timeUnit,
74
+ category: params.category,
75
+ ages: params.ages,
76
+ });
77
+ }
78
+ /**
79
+ * 쇼핑 키워드 트렌드 핸들러 (복수 키워드 그룹 지원)
80
+ * 네이버 데이터랩 쇼핑 키워드 그룹 트렌드 분석 API 호출
81
+ * @param params DatalabShoppingKeywords
82
+ */
83
+ export async function handleShoppingKeywordsTrend(params) {
84
+ // 키워드 배열을 네이버 API에 맞는 형식으로 변환
85
+ return client.datalabShoppingKeywords({
86
+ startDate: params.startDate,
87
+ endDate: params.endDate,
88
+ timeUnit: params.timeUnit,
89
+ category: params.category,
90
+ keyword: params.keyword,
91
+ });
92
+ }
93
+ /**
94
+ * 쇼핑 키워드 기기별 트렌드 핸들러
95
+ * 네이버 데이터랩 쇼핑 키워드 기기별 트렌드 분석 API 호출
96
+ * @param params DatalabShoppingKeywordDevice
97
+ */
98
+ export async function handleShoppingKeywordByDeviceTrend(params) {
99
+ return client.datalabShoppingKeywordByDevice({
100
+ startDate: params.startDate,
101
+ endDate: params.endDate,
102
+ timeUnit: params.timeUnit,
103
+ category: params.category,
104
+ keyword: params.keyword,
105
+ device: params.device,
106
+ });
107
+ }
108
+ /**
109
+ * 쇼핑 키워드 성별 트렌드 핸들러
110
+ * 네이버 데이터랩 쇼핑 키워드 성별 트렌드 분석 API 호출
111
+ * @param params DatalabShoppingKeywordGender
112
+ */
113
+ export async function handleShoppingKeywordByGenderTrend(params) {
114
+ return client.datalabShoppingKeywordByGender({
115
+ startDate: params.startDate,
116
+ endDate: params.endDate,
117
+ timeUnit: params.timeUnit,
118
+ category: params.category,
119
+ keyword: params.keyword,
120
+ gender: params.gender,
121
+ });
122
+ }
123
+ /**
124
+ * 쇼핑 키워드 연령별 트렌드 핸들러
125
+ * 네이버 데이터랩 쇼핑 키워드 연령별 트렌드 분석 API 호출
126
+ * @param params DatalabShoppingKeywordAge
127
+ */
128
+ export async function handleShoppingKeywordByAgeTrend(params) {
129
+ return client.datalabShoppingKeywordByAge({
130
+ startDate: params.startDate,
131
+ endDate: params.endDate,
132
+ timeUnit: params.timeUnit,
133
+ category: params.category,
134
+ keyword: params.keyword,
135
+ ages: params.ages,
136
+ });
137
+ }
@@ -0,0 +1,44 @@
1
+ import { NaverLocalSearchParams } from "../schemas/search.schemas.js";
2
+ import { SearchArgs } from "../schemas/search.schemas.js";
3
+ export declare const searchToolHandlers: Record<string, (args: any) => Promise<any>>;
4
+ /**
5
+ * 전문자료 검색 핸들러
6
+ */
7
+ export declare function handleAcademicSearch(params: SearchArgs): Promise<import("../types/search.types.js").NaverDocumentSearchResponse>;
8
+ /**
9
+ * 도서 검색 핸들러
10
+ */
11
+ export declare function handleBookSearch(params: SearchArgs): Promise<any>;
12
+ /**
13
+ * 지식백과 검색 핸들러
14
+ */
15
+ export declare function handleEncycSearch(params: SearchArgs): Promise<any>;
16
+ /**
17
+ * 이미지 검색 핸들러
18
+ */
19
+ export declare function handleImageSearch(params: SearchArgs): Promise<any>;
20
+ /**
21
+ * 지식iN 검색 핸들러
22
+ */
23
+ export declare function handleKinSearch(params: SearchArgs): Promise<any>;
24
+ /**
25
+ * 지역 검색 핸들러
26
+ */
27
+ export declare function handleLocalSearch(params: NaverLocalSearchParams): Promise<import("../types/search.types.js").NaverLocalSearchResponse>;
28
+ /**
29
+ * 뉴스 검색 핸들러
30
+ */
31
+ export declare function handleNewsSearch(params: SearchArgs): Promise<any>;
32
+ /**
33
+ * 블로그 검색 핸들러
34
+ */
35
+ export declare function handleBlogSearch(params: SearchArgs): Promise<any>;
36
+ /**
37
+ * 쇼핑 검색 핸들러
38
+ */
39
+ export declare function handleShopSearch(params: SearchArgs): Promise<any>;
40
+ /**
41
+ * 카페글 검색 핸들러
42
+ */
43
+ export declare function handleCafeArticleSearch(params: SearchArgs): Promise<any>;
44
+ export declare function handleWebKrSearch(args: SearchArgs): Promise<any>;
@@ -0,0 +1,81 @@
1
+ import { NaverSearchClient } from "../clients/naver-search.client.js";
2
+ import { SearchArgsSchema } from "../schemas/search.schemas.js";
3
+ // 클라이언트 인스턴스
4
+ const client = NaverSearchClient.getInstance();
5
+ export const searchToolHandlers = {
6
+ search_webkr: (args) => handleWebKrSearch(SearchArgsSchema.parse(args)),
7
+ search_news: (args) => handleNewsSearch(SearchArgsSchema.parse(args)),
8
+ search_blog: (args) => handleBlogSearch(SearchArgsSchema.parse(args)),
9
+ search_shop: (args) => handleShopSearch(SearchArgsSchema.parse(args)),
10
+ search_image: (args) => handleImageSearch(SearchArgsSchema.parse(args)),
11
+ search_kin: (args) => handleKinSearch(SearchArgsSchema.parse(args)),
12
+ search_book: (args) => handleBookSearch(SearchArgsSchema.parse(args)),
13
+ search_encyc: (args) => handleEncycSearch(SearchArgsSchema.parse(args)),
14
+ search_academic: (args) => handleAcademicSearch(SearchArgsSchema.parse(args)),
15
+ search_local: (args) => handleLocalSearch(args),
16
+ search_cafearticle: (args) => handleCafeArticleSearch(args),
17
+ };
18
+ /**
19
+ * 전문자료 검색 핸들러
20
+ */
21
+ export async function handleAcademicSearch(params) {
22
+ return client.searchAcademic(params);
23
+ }
24
+ /**
25
+ * 도서 검색 핸들러
26
+ */
27
+ export async function handleBookSearch(params) {
28
+ return client.search("book", params);
29
+ }
30
+ /**
31
+ * 지식백과 검색 핸들러
32
+ */
33
+ export async function handleEncycSearch(params) {
34
+ return client.search("encyc", params);
35
+ }
36
+ /**
37
+ * 이미지 검색 핸들러
38
+ */
39
+ export async function handleImageSearch(params) {
40
+ return client.search("image", params);
41
+ }
42
+ /**
43
+ * 지식iN 검색 핸들러
44
+ */
45
+ export async function handleKinSearch(params) {
46
+ return client.search("kin", params);
47
+ }
48
+ /**
49
+ * 지역 검색 핸들러
50
+ */
51
+ export async function handleLocalSearch(params) {
52
+ return client.searchLocal(params);
53
+ }
54
+ /**
55
+ * 뉴스 검색 핸들러
56
+ */
57
+ export async function handleNewsSearch(params) {
58
+ return client.search("news", params);
59
+ }
60
+ /**
61
+ * 블로그 검색 핸들러
62
+ */
63
+ export async function handleBlogSearch(params) {
64
+ return client.search("blog", params);
65
+ }
66
+ /**
67
+ * 쇼핑 검색 핸들러
68
+ */
69
+ export async function handleShopSearch(params) {
70
+ return client.search("shop", params);
71
+ }
72
+ /**
73
+ * 카페글 검색 핸들러
74
+ */
75
+ export async function handleCafeArticleSearch(params) {
76
+ return client.search("cafearticle", params);
77
+ }
78
+ export async function handleWebKrSearch(args) {
79
+ const client = NaverSearchClient.getInstance();
80
+ return await client.search("webkr", args);
81
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};