Skip to main content
Glama
scvcoder

korean-privacy-law-mcp

by scvcoder

search_admin_appeals

Search administrative appeal precedents related to PIPA violations. Find decisions on corrective orders, fines, and other administrative dispositions by keywords or case numbers.

Instructions

행정심판 재결례 검색 (법제처 lawSearch · target=decc). 행정처분 취소·이행 청구 결정 메타. PIPA 위반에 대한 시정명령·과징금 등 행정처분에 대한 불복 사건 확인. 다음: get_admin_appeal_text(W2.5)로 재결례 전문.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes행정심판 재결례 키워드. 사건명·사건번호 매칭 (예: '개인정보 열람 거부', '처분 취소').
displayNo결과 개수 (기본 20)
pageNo페이지 번호 (기본 1)

Implementation Reference

  • Main tool handler for search_admin_appeals. Calls lawSearch.do API with target='decc', parses XML response to extract admin appeal items (행정심판재결례일련번호, 사건번호, 사건명, etc.), formats results with pagination info, appends a suggestion to get_admin_appeal_text for the first result, and returns the text content.
    export const searchAdminAppeals: Tool<typeof inputSchema> = {
      name: "search_admin_appeals",
      description:
        "행정심판 재결례 검색 (법제처 lawSearch · target=decc). 행정처분 취소·이행 청구 결정 메타. " +
        "PIPA 위반에 대한 시정명령·과징금 등 행정처분에 대한 불복 사건 확인. " +
        "다음: get_admin_appeal_text(W2.5)로 재결례 전문.",
      inputSchema,
    
      async handler(args, client) {
        try {
          const xml = await client.fetchApi({
            endpoint: "lawSearch.do",
            target: "decc",
            extraParams: {
              query: args.query,
              display: String(args.display),
              page: String(args.page),
            },
          });
    
          const result = parseSearchXML<AdminAppealItem>(
            xml,
            "Decc",
            "decc",
            (itemXml) => ({
              행정심판재결례일련번호: extractTag(itemXml, "행정심판재결례일련번호"),
              사건번호: extractTag(itemXml, "사건번호"),
              사건명: extractTag(itemXml, "사건명"),
              처분일자: extractTag(itemXml, "처분일자"),
              의결일자: extractTag(itemXml, "의결일자"),
              처분청: extractTag(itemXml, "처분청"),
              재결청: extractTag(itemXml, "재결청"),
              재결구분명: extractTag(itemXml, "재결구분명"),
            })
          );
    
          if (result.totalCnt === 0) {
            return notFoundResponse(`행정심판 재결례 검색 결과 없음: "${args.query}"`, [
              `search_pipc_decisions(query="${args.query}") — PIPC 의결도 시도`,
            ]);
          }
    
          let text = `행정심판 재결례 — "${args.query}"\n`;
          text += `총 ${result.totalCnt}건 중 ${result.items.length}건 표시 (페이지 ${result.page})\n\n`;
    
          for (const item of result.items) {
            text += `[id=${item.행정심판재결례일련번호}] ${item.사건명}\n`;
            if (item.사건번호) text += `  사건번호: ${item.사건번호}\n`;
            if (item.재결청) text += `  재결청: ${item.재결청}\n`;
            if (item.처분청) text += `  처분청: ${item.처분청}\n`;
            if (item.의결일자) text += `  의결일자: ${item.의결일자}\n`;
            if (item.재결구분명) text += `  재결구분: ${item.재결구분명}\n`;
            text += "\n";
          }
    
          const firstItem = result.items[0];
          if (firstItem) {
            text = appendSuggestions(text, [
              {
                tool: "get_admin_appeal_text",
                args: { id: firstItem.행정심판재결례일련번호 },
                reason: `${firstItem.사건명.slice(0, 30)}... 재결례 전문`,
              },
            ]);
            text += `\n📎 출처: 행정심판 재결례 — 첫 결과 ${adminAppealUrl(firstItem.행정심판재결례일련번호)}`;
          }
    
          return { content: [{ type: "text", text }] };
        } catch (err) {
          return formatToolError(err, "search_admin_appeals");
        }
      },
    };
  • Zod input schema for search_admin_appeals: query (string, required), display (number 1-100, default 20), page (number, default 1).
    const inputSchema = z.object({
      query: z
        .string()
        .min(1)
        .describe(
          "행정심판 재결례 키워드. 사건명·사건번호 매칭 (예: '개인정보 열람 거부', '처분 취소')."
        ),
      display: z.number().int().min(1).max(100).default(20).describe("결과 개수 (기본 20)"),
      page: z.number().int().min(1).default(1).describe("페이지 번호 (기본 1)"),
    });
  • AdminAppealItem interface defining the shape of parsed XML result items with fields for serial number, case number, case name, disposition date, decision date, agency, adjudication body, and adjudication type.
    interface AdminAppealItem {
      행정심판재결례일련번호: string;
      사건번호: string;
      사건명: string;
      처분일자: string;
      의결일자: string;
      처분청: string;
      재결청: string;
      재결구분명: string;
    }
  • Import of searchAdminAppeals from the search-admin-appeals module.
    import { searchAdminAppeals } from "./primitives/search-admin-appeals.js";
  • Registration of searchAdminAppeals in the ALL_TOOLS array, making it available to the MCP server.
    searchAdminAppeals,
Behavior2/5

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

No annotations are provided, and the description lacks behavioral details such as pagination behavior, sorting order, or rate limits. For a search tool, it doesn't disclose whether results are returned in a specific order or how to iterate through pages beyond the 'page' parameter.

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 brief (two sentences) and front-loads the main purpose. No wasted words, though the mix of Korean and English might be slightly confusing.

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?

No output schema exists, and the description does not explain the return format (fields of decision metadata). It fails to inform the agent about the structure of search results, which is necessary for downstream usage.

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?

Schema coverage is 100% with descriptions for query, display, and page. The description adds minor value by specifying the source (target=decc) and metadata type, but largely repeats schema information. Baseline 3 is appropriate.

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 for administrative appeal precedents (행정심판 재결례 검색) and specifies the source (법제처 lawSearch · target=decc). It distinguishes itself from sibling tools like get_admin_appeal_text, which retrieves 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 implies a workflow: use this tool to search, then use get_admin_appeal_text for full text. While it doesn't explicitly state when not to use it, the sibling tools cover different legal domains (e.g., search_law, search_pipc_decisions), providing implicit differentiation.

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