Skip to main content
Glama
Tech-curator

Korean Patent MCP

by Tech-curator

kipris_get_patent_detail

Retrieve detailed Korean patent information by application number using the KIPRIS API. Get comprehensive patent data in markdown or JSON format for analysis and research purposes.

Instructions

출원번호로 특허의 상세 정보를 조회합니다.

Args:
    application_number: 출원번호 (필수, 예: '1020200123456')
    response_format: 응답 형식 ('markdown' 또는 'json')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_numberYes
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler function for 'kipris_get_patent_detail'. It handles input parameters, initializes the KiprisAPIClient if necessary, calls the API client's get_patent_detail method, and formats the output as Markdown or JSON.
    @mcp.tool(name="kipris_get_patent_detail")
    async def kipris_get_patent_detail(
        application_number: str,
        response_format: str = "markdown"
    ) -> str:
        """출원번호로 특허의 상세 정보를 조회합니다.
        
        Args:
            application_number: 출원번호 (필수, 예: '1020200123456')
            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_patent_detail(app_num)
            if result is None:
                return f"❌ 출원번호 `{application_number}`에 해당하는 특허를 찾을 수 없습니다."
            
            if response_format == "json":
                return json.dumps(result, ensure_ascii=False, indent=2)
            return format_patent_markdown(result, detailed=True)
        except Exception as e:
            return f"❌ 조회 오류: {str(e)}"
  • The core helper method in KiprisAPIClient that performs the actual HTTP request to the KIPRIS API for patent details, parses the XML response, and extracts the detailed patent information using _parse_patent_info.
    async def get_patent_detail(
        self,
        application_number: str
    ) -> Optional[Dict[str, Any]]:
        """
        출원번호로 특허 상세 정보 조회
        
        Args:
            application_number: 출원번호 (예: "1020200123456")
            
        Returns:
            특허 상세 정보 딕셔너리
        """
        params = {
            "applicationNumber": application_number,
            "docsStart": "1"
        }
        
        root = await self._make_request(
            self.ENDPOINTS["patent_info"],
            params
        )
        
        if root is None:
            return None
        
        item = root.find(".//PatentUtilityInfo")
        if item is None:
            return None
        
        return self._parse_patent_info(item, detailed=True)
  • Helper function to format the patent detail data into a readable Markdown string, used by the tool handler when response_format is 'markdown'.
    def format_patent_markdown(patent: dict, detailed: bool = False) -> str:
        lines = []
        lines.append(f"### {patent.get('title', '제목 없음')}")
        lines.append("")
        lines.append(f"- **출원번호**: {patent.get('application_number', '-')}")
        lines.append(f"- **출원일**: {patent.get('application_date', '-')}")
        lines.append(f"- **출원인**: {patent.get('applicant', '-')}")
        lines.append(f"- **등록상태**: {patent.get('registration_status', '-')}")
        
        if patent.get('opening_number'):
            lines.append(f"- **공개번호**: {patent.get('opening_number')} ({patent.get('opening_date', '-')})")
        if patent.get('registration_number'):
            lines.append(f"- **등록번호**: {patent.get('registration_number')} ({patent.get('registration_date', '-')})")
        if detailed:
            if patent.get('ipc_number'):
                lines.append(f"- **IPC 분류**: {patent.get('ipc_number')}")
            if patent.get('abstract'):
                lines.append("")
                lines.append("**초록**:")
                lines.append(f"> {patent.get('abstract')[:500]}...")
        
        return "\n".join(lines)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a retrieval operation ('조회합니다'), implying read-only behavior, but doesn't address permissions, rate limits, error handling, or response structure. The mention of response formats ('markdown' or 'json') hints at output behavior, but overall, it lacks critical details for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the purpose stated first, followed by parameter details. It uses two sentences efficiently, with no redundant information. However, the parameter section could be slightly more integrated into the flow, but overall, it's concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is partially complete. It covers the basic purpose and parameters but lacks usage guidelines and behavioral context. The presence of an output schema reduces the need to explain return values, but without annotations, more behavioral details would improve completeness for a retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds some semantic value beyond the input schema, which has 0% description coverage. It explains 'application_number' as '출원번호 (필수, 예: '1020200123456')' (application number, required, example) and 'response_format' as '응답 형식 ('markdown' 또는 'json')' (response format, 'markdown' or 'json'), providing meaning and examples. However, it doesn't fully compensate for the schema's lack of descriptions, as it misses details like format constraints or default behavior for 'response_format'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '출원번호로 특허의 상세 정보를 조회합니다' (Retrieve detailed information of a patent by application number). It specifies the verb '조회합니다' (retrieve) and resource '특허의 상세 정보' (detailed patent information), making the action and target explicit. However, it doesn't differentiate from sibling tools like 'kipris_search_patents' (which likely searches broadly) or 'kipris_get_citing_patents' (which retrieves citing patents), so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'kipris_search_patents' for broader searches or 'kipris_get_citing_patents' for related patents, nor does it specify prerequisites, exclusions, or contextual cues. Usage is implied only by the purpose statement, lacking explicit when/when-not instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tech-curator/korean-patent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server