Skip to main content
Glama
shinkeonkim

독립유공자 공훈록 MCP 서버

by shinkeonkim

clear_cache

Clear cached data to ensure access to current information from the Independence Activist Merits Record MCP server.

Instructions

캐시된 데이터를 모두 초기화합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for the clear_cache tool in the call_tool dispatcher. Clears the cache via cache_manager and returns a success response.
    elif name == "clear_cache":
        # 캐시 초기화
        cache_manager.clear()
        return [
            TextContent(
                type="text",
                text=format_response({
                    "success": True,
                    "message": "캐시가 성공적으로 초기화되었습니다."
                })
            )
        ]
  • Schema definition for the clear_cache tool: no input parameters required.
    Tool(
        name="clear_cache",
        description="캐시된 데이터를 모두 초기화합니다",
        inputSchema={
            "type": "object",
            "properties": {}
        }
    )
  • Registration of all tools including clear_cache via the @app.list_tools() decorator.
    @app.list_tools()
    async def list_tools() -> List[Tool]:
        """
        사용 가능한 독립유공자 공훈록 관련 도구들을 나열합니다.
        
        Returns:
            도구 목록
        """
        try:
            return [
                Tool(
                    name="get_merit_list",
                    description="독립유공자 공훈록 목록을 조회합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {
                            "page_index": {
                                "type": "integer",
                                "description": "페이지 번호",
                                "default": 1
                            },
                            "count_per_page": {
                                "type": "integer",
                                "description": "페이지 당 데이터 건수 (최대 50건)",
                                "default": 10,
                                "maximum": 50
                            },
                            "mng_no": {
                                "type": "string",
                                "description": "관리번호"
                            },
                            "name_ko": {
                                "type": "string",
                                "description": "성명(한글)"
                            },
                            "name_ch": {
                                "type": "string",
                                "description": "성명(한자)"
                            },
                            "diff_name": {
                                "type": "string",
                                "description": "이명"
                            },
                            "birthday": {
                                "type": "string",
                                "description": "생년월일 (YYYYMMDD, 년(1945), 년월(194501), 년월일(19450101))"
                            },
                            "lastday": {
                                "type": "string",
                                "description": "사망년월일 (YYYYMMDD, 년(1945), 년월(194501), 년월일(19450101))"
                            },
                            "sex": {
                                "type": "string",
                                "description": "성별 (0: 여, 1: 남)",
                                "enum": ["0", "1"]
                            },
                            "register_large_div": {
                                "type": "string",
                                "description": "본적대분류"
                            },
                            "register_mid_div": {
                                "type": "string",
                                "description": "본적중분류"
                            },
                            "judge_year": {
                                "type": "string",
                                "description": "포상년도"
                            },
                            "hunkuk": {
                                "type": "string",
                                "description": "훈격",
                                "enum": list(HUNKUK_CODES.keys())
                            },
                            "workout_affil": {
                                "type": "string",
                                "description": "운동계열",
                                "enum": list(WORKOUT_AFFIL_CODES.keys())
                            },
                            "achivement": {
                                "type": "string",
                                "description": "공훈록"
                            }
                        }
                    }
                ),
                Tool(
                    name="get_public_report",
                    description="독립유공자 공적조서를 조회합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {
                            "page_index": {
                                "type": "integer",
                                "description": "페이지 번호",
                                "default": 1
                            },
                            "count_per_page": {
                                "type": "integer",
                                "description": "페이지 당 데이터 건수 (최대 50건)",
                                "default": 10,
                                "maximum": 50
                            },
                            "mng_no": {
                                "type": "string",
                                "description": "관리번호"
                            },
                            "name_ko": {
                                "type": "string",
                                "description": "성명(한글)"
                            },
                            "name_ch": {
                                "type": "string",
                                "description": "성명(한자)"
                            },
                            "diff_name": {
                                "type": "string",
                                "description": "이명"
                            },
                            "birthday": {
                                "type": "string",
                                "description": "생년월일 (YYYYMMDD, 년(1945), 년월(194501), 년월일(19450101))"
                            },
                            "lastday": {
                                "type": "string",
                                "description": "사망년월일 (YYYYMMDD, 년(1945), 년월(194501), 년월일(19450101))"
                            },
                            "sex": {
                                "type": "string",
                                "description": "성별 (0: 여, 1: 남)",
                                "enum": ["0", "1"]
                            },
                            "register_large_div": {
                                "type": "string",
                                "description": "본적대분류"
                            },
                            "register_mid_div": {
                                "type": "string",
                                "description": "본적중분류"
                            },
                            "judge_year": {
                                "type": "string",
                                "description": "포상년도"
                            },
                            "hunkuk": {
                                "type": "string",
                                "description": "훈격",
                                "enum": list(HUNKUK_CODES.keys())
                            },
                            "workout_affil": {
                                "type": "string",
                                "description": "운동계열",
                                "enum": list(WORKOUT_AFFIL_CODES.keys())
                            },
                            "achivement": {
                                "type": "string",
                                "description": "공적개요"
                            },
                            "achivement_ko": {
                                "type": "string",
                                "description": "공적개요 국한문병기"
                            }
                        }
                    }
                ),
                Tool(
                    name="get_hunkuk_codes",
                    description="훈격 코드 정보를 조회합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {}
                    }
                ),
                Tool(
                    name="get_workout_affil_codes",
                    description="운동계열 코드 정보를 조회합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {}
                    }
                ),
                Tool(
                    name="clear_cache",
                    description="캐시된 데이터를 모두 초기화합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {}
                    }
                )
            ]
        except Exception as e:
            logger.error(f"도구 목록 생성 중 오류 발생: {str(e)}")
            # 최소한의 기본 도구라도 반환
            return [
                Tool(
                    name="get_merit_list",
                    description="독립유공자 공훈록 목록을 조회합니다",
                    inputSchema={
                        "type": "object",
                        "properties": {
                            "page_index": {
                                "type": "integer",
                                "description": "페이지 번호",
                                "default": 1
                            },
                            "count_per_page": {
                                "type": "integer",
                                "description": "페이지 당 데이터 건수 (최대 50건)",
                                "default": 10
                            }
                        }
                    }
                )
            ]
  • CacheManager.clear() method that implements the actual cache clearing logic used by the tool handler.
    def clear(self) -> None:
        """모든 캐시를 초기화합니다."""
        self.last_cache_time.clear()
        self.cache_data.clear()
        logger.info("캐시가 초기화되었습니다.")
Behavior2/5

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

No annotations are provided, so the description carries full burden. '초기화합니다' (initializes/clears) implies a destructive mutation, but the description doesn't disclose important behavioral traits: whether this requires special permissions, whether the operation is reversible, what '모두' (all) means in terms of scope, or any side effects. For a destructive tool with zero annotation coverage, this is inadequate.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core action. Every word earns its place.

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

Completeness2/5

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

Given this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what '초기화' entails operationally, what data is affected, whether there are confirmation prompts, what the return value might be, or error conditions. For a tool that presumably modifies system state, this leaves critical gaps.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and it doesn't need to compensate for any schema gaps.

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 action ('초기화합니다' - initializes/clears) and the target ('캐시된 데이터' - cached data), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools, which appear to be unrelated read operations (get_* tools), so it doesn't need sibling differentiation but doesn't explicitly state this 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 prerequisites, timing considerations, or when not to use it. Given that siblings are get_* tools, the distinction is implied (this is a write operation vs their read operations), but this isn't explicitly stated in the description.

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/shinkeonkim/e-gonghun-mcp'

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