correct_errata
Fix Korean and English keyboard input errors in text queries to improve search accuracy on Naver platforms.
Instructions
Converts Korean/English keyboard input errors.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- server.py:514-527 (handler)The handler function decorated with @mcp.tool for the 'correct_errata' tool. It accepts a query string and delegates to the _make_api_call helper to invoke the Naver errata.json API and process the response.@mcp.tool( name="correct_errata", description="Converts Korean/English keyboard input errors." ) async def correct_errata(query: str) -> str: """ Converts Korean/English keyboard input errors. Args: query (str): The keyword to search for """ params = {"query": query} return await _make_api_call("errata.json", params, ErrataResult, "Errata Conversion")
- server.py:112-112 (schema)Pydantic model defining the schema for the Naver errata API response, with a single 'errata' field containing the corrected string or empty if no correction.class ErrataResult(BaseModel): errata: str
- server.py:310-317 (helper)Specific processing logic for ErrataResult within the shared _make_api_call function, which formats the output message based on whether an errata correction was found.elif isinstance(result, ErrataResult): print(f"ErrataResult: {result}") prompt_string = f"네이버 {search_type_name} 확인 결과:" if result.errata == "": return f"{prompt_string} 오타 없음" else: return f"{prompt_string} {result.errata}"