search_webkr
Retrieve web documents by keyword search with optional page navigation, enabling structured data access through Naver Search APIs for streamlined information retrieval.
Instructions
Searches for web documents using the given keyword. The page parameter allows for page navigation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| display | No | ||
| page | No | ||
| query | Yes |
Implementation Reference
- server.py:593-605 (handler)The asynchronous handler function implementing the 'search_webkr' tool. It calculates pagination parameters and makes an API call to 'webkr.json' using the helper _make_api_call, returning a formatted string result.async def search_webkr(query: str, display: int = 10, page: int = 1) -> str: """ Searches for web documents using the given keyword. The page parameter allows for page navigation. Args: query (str): The keyword to search for display (int, optional): The number of results to display. Default is 10. page (int, optional): The starting page number. Default is 1. """ start = calculate_start(page, display) display = min(display, 100) params = {"query": query, "display": display, "start": start} return await _make_api_call("webkr.json", params, WebkrResult, "Web Document")
- server.py:589-592 (registration)Registration of the 'search_webkr' tool using the @mcp.tool decorator, specifying name and description.@mcp.tool( name="search_webkr", description="Searches for web documents using the given keyword. The page parameter allows for page navigation." )
- server.py:593-601 (schema)Input schema defined by function parameters with type annotations and defaults, output str. Docstring provides detailed argument descriptions.async def search_webkr(query: str, display: int = 10, page: int = 1) -> str: """ Searches for web documents using the given keyword. The page parameter allows for page navigation. Args: query (str): The keyword to search for display (int, optional): The number of results to display. Default is 10. page (int, optional): The starting page number. Default is 1. """