Skip to main content
Glama
scvcoder

korean-privacy-law-mcp

by scvcoder

get_pipc_curated_corpus

Access the official PIPC-curated corpus of Korean privacy laws and rules from privacy.go.kr. Filter by 12 statutes, 23 administrative rules, or view all.

Instructions

PIPC 공식 큐레이션 일반 도메인 출발점 (개인정보 포털 privacy.go.kr 직접 게시). 12개 법령 + 23개 행정규칙 — PIPC가 '개인정보 보호 관련'으로 직접 분류한 list. 분야별 안내서(8개 분야)와 별개의 일반 큐레이션. PIPA 도메인 첫 진입 시 권유. ** 우리 큐레이션 0 — PIPC가 portal에 게시한 list 그대로. ** 출처 URL 자동 첨부 (사용자 검증 가능). 다음: search_law(법령명)·search_admin_rule(고시명)으로 본문, get_sectoral_related_laws(sector)로 분야별 매핑.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNolaw=12개 법령 / admrul=23개 행정규칙 / all=전체 (기본 all)all

Implementation Reference

  • Main handler for the get_pipc_curated_corpus tool. Reads PIPC's official curated corpus (12 laws + 23 administrative rules) from a data index and returns formatted text listing them by category.
    export const getPipcCuratedCorpus: Tool<typeof inputSchema> = {
      name: "get_pipc_curated_corpus",
      description:
        "PIPC 공식 큐레이션 일반 도메인 출발점 (개인정보 포털 privacy.go.kr 직접 게시). " +
        "12개 법령 + 23개 행정규칙 — PIPC가 '개인정보 보호 관련'으로 직접 분류한 list. " +
        "분야별 안내서(8개 분야)와 별개의 *일반* 큐레이션. PIPA 도메인 첫 진입 시 권유. " +
        "** 우리 큐레이션 0 — PIPC가 portal에 게시한 list 그대로. ** " +
        "출처 URL 자동 첨부 (사용자 검증 가능). " +
        "다음: search_law(법령명)·search_admin_rule(고시명)으로 본문, get_sectoral_related_laws(sector)로 분야별 매핑.",
      inputSchema,
    
      async handler(args) {
        try {
          const idx = getDataIndex();
          const portal = idx.portal;
    
          let text = `=== ${portal.title} ===\n`;
          text += `\n📘 ${portal.note}\n\n`;
    
          if (args.category === "all" || args.category === "law") {
            text += `【 개인정보 보호 관련 법령 — 12개 】\n`;
            text += `📎 출처: ${portal.source_url_laws}\n\n`;
            for (let i = 0; i < portal.laws.length; i++) {
              const law = portal.laws[i];
              if (!law) continue;
              text += `  ${(i + 1).toString().padStart(2, " ")}. ${law.name}\n`;
              text += `      소관: ${law.ministry}\n`;
            }
          }
    
          if (args.category === "all") text += "\n";
    
          if (args.category === "all" || args.category === "admrul") {
            text += `【 개인정보 보호 관련 행정규칙 — ${portal.admrules.length}개 】\n`;
            text += `📎 출처: ${portal.source_url_admrules}\n\n`;
            for (let i = 0; i < portal.admrules.length; i++) {
              const r = portal.admrules[i];
              if (!r) continue;
              text += `  ${(i + 1).toString().padStart(2, " ")}. ${r.name}\n`;
              text += `      종류: ${r.law_kind}\n`;
            }
          }
    
          // 면책
          text += `\n⚠ 면책 (LLM 필독)\n`;
          text += `- 위 list는 PIPC가 개인정보 포털에 게시한 *공식 큐레이션* 그대로.\n`;
          text += `- PIPA 도메인 *일반* 출발점이며 *완전한* list는 아님 (PIPC가 의도적으로 추린 것).\n`;
          text += `- 분야별 (의료·복지·인사 등) 매핑은 get_sectoral_related_laws 사용.\n`;
          text += `- 그 외 적용 법령 검색은 search_law / intelligent_law_search.\n`;
          text += `- 최종 적용 법령 결정은 LLM·실무자 책임. 본 도구는 출발점일 뿐.\n`;
    
          // 다음 도구 anchoring
          const suggestions: Array<{
            tool: string;
            args: Record<string, unknown>;
            reason: string;
          }> = [
            {
              tool: "get_sectoral_related_laws",
              args: {},
              reason: "분야별(8개) PIPC 매핑 — 의료·복지·인사·약국·학원·통계·공공·온라인경품",
            },
            {
              tool: "search_law",
              args: { query: portal.laws[0]?.name ?? "개인정보 보호법" },
              reason: "특정 법령 정식 본문 조회",
            },
            {
              tool: "search_admin_rule",
              args: { query: "개인정보" },
              reason: "PIPC 고시·훈령 본문 검색",
            },
          ];
          text = appendSuggestions(text, suggestions);
    
          return { content: [{ type: "text", text }] };
        } catch (err) {
          return formatToolError(err, "get_pipc_curated_corpus");
        }
      },
    };
  • Input schema: optional category enum (all, law, admrul) defaulting to 'all'.
    const inputSchema = z.object({
      category: z
        .enum(["all", "law", "admrul"])
        .default("all")
        .describe("law=12개 법령 / admrul=23개 행정규칙 / all=전체 (기본 all)"),
    });
  • Import of getPipcCuratedCorpus in the central tool registry.
    import { getPipcCuratedCorpus } from "./hints/get-pipc-curated-corpus.js";
  • Tool registered in ALL_TOOLS array to be exposed by the MCP server.
    getPipcCuratedCorpus,
  • Lazy singleton loader for the data index (portal corpus + sector entries) consumed by the handler.
    export function getDataIndex(): DataIndex {
      if (CACHE) return CACHE;
      CACHE = buildIndex();
      return CACHE;
    }
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that data is PIPC's original list (not curated), and source URL is automatically attached for verification. Lacks explicit statement on side effects but is sufficiently transparent.

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?

Description is moderately long but each sentence adds value. Front-loads purpose and provides necessary context. Could be slightly more concise but is well-structured.

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

Completeness5/5

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

Given single parameter, no output schema, and sibling tools in same domain, this description fully equips an agent to select and invoke the tool correctly, including navigation guidance.

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?

Schema coverage is 100% with enum and default. Description adds detail by specifying '12 laws' and '23 administrative rules' for each category, enhancing agent understanding beyond the schema.

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

Purpose5/5

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

The description clearly states it provides PIPC's official curated corpus of laws and administrative rules related to personal information protection, distinguishing it from sectoral guides and sibling tool 'get_sectoral_related_laws'.

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

Usage Guidelines5/5

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

Explicitly recommends this tool for first entry into PIPA domain and lists alternatives (search_law, search_admin_rule, get_sectoral_related_laws) for further exploration.

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/scvcoder/korean-privacy-law-mcp'

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