kipris_get_citing_patents
Retrieve patents that cite a specific Korean patent by entering its application number. Use this tool to analyze citation networks and identify subsequent innovations building upon prior art.
Instructions
특정 특허를 인용한 후행 특허들을 조회합니다.
Args:
application_number: 기준 특허의 출원번호 (필수)
response_format: 응답 형식 ('markdown' 또는 'json')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| application_number | Yes | ||
| response_format | No | markdown |
Implementation Reference
- src/korean_patent_mcp/server.py:241-275 (handler)The main MCP tool handler function decorated with @mcp.tool. It handles input parameters, initializes the API client, calls the core get_citing_patents method, and formats the response as markdown or JSON.@mcp.tool(name="kipris_get_citing_patents") async def kipris_get_citing_patents( application_number: str, response_format: str = "markdown" ) -> str: """특정 특허를 인용한 후행 특허들을 조회합니다. Args: application_number: 기준 특허의 출원번호 (필수) response_format: 응답 형식 ('markdown' 또는 'json') """ # Get API key from session config or environment api_key = get_config_value("kiprisApiKey") or os.getenv("KIPRIS_API_KEY", "") if api_key: init_client_with_key(api_key) client = get_kipris_client() if client is None: return f"❌ 오류: {get_init_error() or 'API 클라이언트 초기화 실패'}" app_num = application_number.replace("-", "") try: result = await client.get_citing_patents(app_num) if response_format == "json": return json.dumps({ "base_application_number": app_num, "citing_count": len(result), "citing_patents": result }, ensure_ascii=False, indent=2) return format_citing_patents_markdown(result, app_num) except Exception as e: return f"❌ 조회 오류: {str(e)}"
- Core helper method in KiprisAPIClient that performs the actual HTTP request to the KIPRIS 'citingInfo' endpoint, parses the XML response, and extracts the list of citing patents.async def get_citing_patents( self, application_number: str ) -> List[Dict[str, Any]]: """ 특정 특허를 인용한 후행 특허 조회 Args: application_number: 기준 특허의 출원번호 Returns: 인용 특허 목록 """ params = { "standardCitationApplicationNumber": application_number } root = await self._make_request( self.ENDPOINTS["citing_info"], params ) if root is None: return [] citing_patents = [] for item in root.findall(".//citingInfo"): citing_info = { "citing_application_number": self._get_text(item, "ApplicationNumber"), "standard_citation_number": self._get_text(item, "StandardCitationApplicationNumber"), "status_code": self._get_text(item, "StandardStatusCode"), "status_name": self._get_text(item, "StandardStatusCodeName"), "citation_type_code": self._get_text(item, "CitationLiteratureTypeCode"), "citation_type_name": self._get_text(item, "CitationLiteratureTypeCodeName"), } citing_patents.append(citing_info) return citing_patents
- Helper function used by the handler to format the list of citing patents into a readable markdown string.def format_citing_patents_markdown(citations: list, base_app_num: str) -> str: lines = [] lines.append("## 인용 특허 조회 결과") lines.append("") lines.append(f"기준 특허 `{base_app_num}`를 인용한 후행 특허: **{len(citations)}**건") lines.append("") if not citations: lines.append("이 특허를 인용한 후행 특허가 없습니다.") return "\n".join(lines) for i, cite in enumerate(citations, 1): lines.append("---") lines.append(f"**[{i}]** 출원번호: `{cite.get('citing_application_number', '-')}`") lines.append(f"- 상태: {cite.get('status_name', '-')} ({cite.get('status_code', '-')})") lines.append(f"- 인용유형: {cite.get('citation_type_name', '-')}") lines.append("") return "\n".join(lines)