search_news
Search Naver News using a specific query to retrieve relevant articles sorted by similarity or date, with customizable result display and start position.
Instructions
Perform a search on Naver News. (네이버 뉴스 검색)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| display | No | Number of results to display (default: 10) | |
| query | Yes | Search query | |
| sort | No | Sort method (sim: similarity, date: date) | |
| start | No | Start position of search results (default: 1) |
Implementation Reference
- src/handlers/search.handlers.ts:100-104 (handler)Core handler function that executes the news search logic by calling NaverSearchClient.search('news', params)* 뉴스 검색 핸들러 */ export async function handleNewsSearch(params: SearchArgs) { return client.search("news", params); }
- src/handlers/search.handlers.ts:15-17 (handler)Dispatcher handler for search_news tool that validates args with SearchArgsSchema and delegates to handleNewsSearchsearch_news: (args) => { console.error("search_news called with args:", JSON.stringify(args, null, 2)); return handleNewsSearch(SearchArgsSchema.parse(args));
- src/schemas/search.schemas.ts:33-41 (schema)Zod input schema defining parameters for search tools including search_news (query, display, start, sort)export const SearchArgsSchema = z.object({ query: z.string().describe("검색어"), display: z.number().optional().describe("한 번에 가져올 결과 수 (기본 10)"), start: z.number().optional().describe("검색 시작 위치 (기본 1)"), sort: z .enum(["sim", "date"]) .optional() .describe("정렬 방식 (sim: 유사도, date: 날짜순)"), });
- src/index.ts:117-129 (registration)MCP server registration of the search_news tool, including description, input schema, and handler wrapper that calls searchToolHandlers.search_newsserver.registerTool( "search_news", { description: "📰 Search latest Korean news articles from major outlets. Perfect for current events, breaking news, and recent developments. Covers politics, economy, society, and international news. For today's news or current events, use get_current_korean_time first to understand what 'today' means. (네이버 뉴스 검색 - 최신 뉴스와 시사 정보, 오늘 뉴스를 찾을 때는 먼저 get_current_korean_time으로 현재 시간을 확인하세요)", inputSchema: SearchArgsSchema.shape, }, async (args) => { const result = await searchToolHandlers.search_news(args); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }