Skip to main content
Glama
scvcoder

korean-privacy-law-mcp

by scvcoder

search_english_law

Search English translations of Korean privacy statutes, including the Personal Information Protection Act. Use results for GDPR comparison and drafting international reports.

Instructions

영문 법령 검색 (법제처 lawSearch · target=elaw). PIPA 영문본 등 한국 법령 영문 번역 조회. GDPR 비교, 국외 보고·자문 자료 작성에 직접 활용. 다음: get_english_law_text(W2.7)로 영문 본문, compare_articles로 PIPA↔GDPR 비교(국외 API 연계는 v2).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes영문 법령 키워드 (예: 'Personal Information Protection', 'Privacy'). 영문명·한글명 모두 매칭.
displayNo결과 개수 (기본 50)
pageNo페이지 번호 (기본 1)

Implementation Reference

  • Main handler definition for the search_english_law tool. Calls lawSearch.do API with target=elaw, parses XML results into EnglishLawItem objects, formats them with Korean/English names, department, and dates. Includes suggestions for get_english_law_text and get_law_text on first result.
    export const searchEnglishLaw: Tool<typeof inputSchema> = {
      name: "search_english_law",
      description:
        "영문 법령 검색 (법제처 lawSearch · target=elaw). PIPA 영문본 등 한국 법령 영문 번역 조회. " +
        "GDPR 비교, 국외 보고·자문 자료 작성에 직접 활용. " +
        "다음: get_english_law_text(W2.7)로 영문 본문, compare_articles로 PIPA↔GDPR 비교(국외 API 연계는 v2).",
      inputSchema,
    
      async handler(args, client) {
        try {
          const xml = await client.fetchApi({
            endpoint: "lawSearch.do",
            target: "elaw",
            extraParams: {
              query: args.query,
              display: String(args.display),
              page: String(args.page),
            },
          });
    
          const result = parseSearchXML<EnglishLawItem>(
            xml,
            "LawSearch",
            "law",
            (itemXml) => ({
              법령일련번호: extractTag(itemXml, "법령일련번호"),
              법령ID: extractTag(itemXml, "법령ID"),
              // elaw quirk — 법령명한글·영문 둘 다 검색 강조 <strong> 태그가 들어옴
              법령명한글: stripHtmlTags(extractTag(itemXml, "법령명한글")),
              법령명영문: stripHtmlTags(extractTag(itemXml, "법령명영문")),
              소관부처명: extractTag(itemXml, "소관부처명"),
              법령구분명: extractTag(itemXml, "법령구분명"),
              공포일자: extractTag(itemXml, "공포일자"),
              시행일자: extractTag(itemXml, "시행일자"),
            })
          );
    
          if (result.totalCnt === 0) {
            return notFoundResponse(`영문 법령 검색 결과 없음: "${args.query}"`, [
              `search_law(query="${args.query}") — 한글 법령 검색`,
            ]);
          }
    
          let text = `영문 법령 — "${args.query}"\n`;
          text += `총 ${result.totalCnt}건 중 ${result.items.length}건 표시 (페이지 ${result.page})\n\n`;
    
          for (const item of result.items) {
            text += `[mst=${item.법령일련번호}, lawId=${item.법령ID}]\n`;
            text += `  ${item.법령명한글}\n`;
            if (item.법령명영문) text += `  ${item.법령명영문}\n`;
            if (item.법령구분명) text += `  종류: ${item.법령구분명}\n`;
            if (item.소관부처명) text += `  소관: ${item.소관부처명.split(",")[0]}\n`;
            if (item.시행일자) text += `  시행: ${item.시행일자}\n`;
            text += "\n";
          }
    
          const firstItem = result.items[0];
          if (firstItem) {
            text = appendSuggestions(text, [
              {
                tool: "get_english_law_text",
                args: { mst: firstItem.법령일련번호 },
                reason: `${firstItem.법령명영문 || firstItem.법령명한글} 영문 본문`,
              },
              {
                tool: "get_law_text",
                args: { mst: firstItem.법령일련번호 },
                reason: "한글 본문 비교",
              },
            ]);
            text += `\n${formatLawAttribution(firstItem.법령명한글)}`;
          }
    
          return { content: [{ type: "text", text }] };
        } catch (err) {
          return formatToolError(err, "search_english_law");
        }
      },
    };
  • Input schema using Zod: requires 'query' (string, min 1), optional 'display' (int 1-100, default 50), optional 'page' (int min 1, default 1).
    const inputSchema = z.object({
      query: z
        .string()
        .min(1)
        .describe(
          "영문 법령 키워드 (예: 'Personal Information Protection', 'Privacy'). 영문명·한글명 모두 매칭."
        ),
      display: z.number().int().min(1).max(100).default(50).describe("결과 개수 (기본 50)"),
      page: z.number().int().min(1).default(1).describe("페이지 번호 (기본 1)"),
    });
  • TypeScript interface EnglishLawItem defining the shape of parsed search results (법령일련번호, 법령ID, 법령명한글, 법령명영문, 소관부처명, 법령구분명, 공포일자, 시행일자).
    interface EnglishLawItem {
      법령일련번호: string;
      법령ID: string;
      법령명한글: string;
      법령명영문: string;
      소관부처명: string;
      법령구분명: string;
      공포일자: string;
      시행일자: string;
    }
  • Registration in ALL_TOOLS array at line 61, along with its import at line 17.
    searchEnglishLaw,
  • Cross-reference: get_english_law_text schema describes its 'mst' parameter as coming from search_english_law results.
    .describe("법령일련번호 (search_english_law 결과의 mst=N). ID 파라미터는 작동 안 함"),
Behavior3/5

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

No annotations exist, so the description carries full burden. It discloses the source (법제처 lawSearch) and language scope (English translations) but omits behavioral traits like pagination behavior, rate limits, or authentication needs.

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 extremely concise with two information-dense sentences: first states purpose and source, second gives usage context and follow-up tool references. No filler or redundancy.

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

Completeness4/5

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

Given the tool's simplicity (3 parameters, no output schema), the description covers core purpose and usage flow. It could be enhanced by hinting at the return structure (list of law titles) but is adequate for a search tool.

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 descriptions. The description adds useful context for 'query' (Korean/English keyword matching) and provides examples, though 'display' and 'page' gain no extra detail beyond 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 the tool searches English translations of Korean statutes (PIPA etc.) from the Ministry of Legislation database, explicitly distinguishing it from sibling tools like 'search_law' (Korean) and 'get_english_law_text' (getting full text).

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

Usage Guidelines4/5

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

The description recommends follow-up tools ('get_english_law_text', 'compare_articles') and notes use cases (GDPR comparison, reports). It lacks explicit when-not-to-use guidance but provides clear context through sibling tool references.

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