Skip to main content
Glama
scvcoder

korean-privacy-law-mcp

by scvcoder

get_admin_appeal_text

Retrieve complete text of administrative appeal rulings on PIPA violations. Extract case name, claim, order, reasoning to analyze disputes over corrective orders or fines.

Instructions

행정심판 재결례 본문 (법제처 lawService · target=decc). 사건명·재결청·청구취지·재결요지·주문·이유 추출. PIPA 위반에 대한 시정명령·과징금 등 행정처분 불복 사례 분석. 긴 이유는 자동 축약. 다음: search_admin_appeals로 유사 처분 사례, get_pipc_decision_text로 원처분 PIPC 결정 추적.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes행정심판 재결례 일련번호 (search_admin_appeals 결과의 [id=N])

Implementation Reference

  • The main tool handler — fetches admin appeal text via lawService.do (target=decc) by ID, parses the JSON response, extracts fields (case name, agency, opinions, etc.), auto-compacts long fields, and returns formatted text with follow-up suggestions.
    export const getAdminAppealText: Tool<typeof inputSchema> = {
      name: "get_admin_appeal_text",
      description:
        "행정심판 재결례 본문 (법제처 lawService · target=decc). 사건명·재결청·청구취지·재결요지·주문·이유 추출. " +
        "PIPA 위반에 대한 시정명령·과징금 등 행정처분 불복 사례 분석. 긴 이유는 자동 축약. " +
        "다음: search_admin_appeals로 유사 처분 사례, get_pipc_decision_text로 원처분 PIPC 결정 추적.",
      inputSchema,
    
      async handler(args, client) {
        try {
          const jsonText = await client.fetchApi({
            endpoint: "lawService.do",
            target: "decc",
            type: "JSON",
            extraParams: { ID: args.id },
          });
    
          let parsed: { PrecService?: AdminAppealData; Law?: string };
          try {
            parsed = JSON.parse(jsonText);
          } catch {
            return notFoundResponse(`행정심판 재결례 응답 파싱 실패 (id=${args.id})`, [
              `search_admin_appeals(query="...") — 유효한 id 확인`,
            ]);
          }
    
          if (typeof parsed.Law === "string") {
            return notFoundResponse(`행정심판 재결례 없음: ${parsed.Law}`, [
              `search_admin_appeals(query="...") — 유효한 id 확인`,
            ]);
          }
    
          // decc endpoint quirk — 응답 root key가 'PrecService' (DeccService 아님)
          const decision = parsed.PrecService;
          if (!decision) {
            return notFoundResponse(`행정심판 재결례 데이터 없음 (id=${args.id})`, [
              `search_admin_appeals(query="...") — 유효한 id 확인`,
            ]);
          }
    
          const title = decision.사건명 ?? "(사건명 없음)";
    
          let text = `=== ${title} ===\n`;
          if (decision.사건번호) text += `사건번호: ${decision.사건번호}\n`;
          if (decision.재결청) text += `재결청: ${decision.재결청}\n`;
          if (decision.처분청) text += `처분청: ${decision.처분청}\n`;
          if (decision.처분일자) text += `처분일자: ${decision.처분일자}\n`;
          if (decision.의결일자) text += `의결일자: ${decision.의결일자}\n`;
          if (decision.재결례유형명) text += `유형: ${decision.재결례유형명}\n`;
          if (decision.행정심판례일련번호)
            text += `재결례ID: ${decision.행정심판례일련번호}\n`;
    
          // 핵심 본문 — 우선순위 (청구취지 → 재결요지 → 주문 → 이유)
          text += formatField("청구취지", decision.청구취지);
          text += formatField("재결요지", decision.재결요지);
          text += formatField("주문", decision.주문);
          text += formatField("이유", decision.이유);
    
          text = appendSuggestions(text, [
            {
              tool: "search_admin_appeals",
              args: { query: title.slice(0, 20) },
              reason: "유사 행정심판 사례 검색",
            },
          ]);
          text += `\n📎 출처: 행정심판 재결례 (id=${args.id}) — ${adminAppealUrl(args.id)}`;
    
          return { content: [{ type: "text", text }] };
        } catch (err) {
          return formatToolError(err, "get_admin_appeal_text");
        }
      },
    };
  • Input schema: requires a single string 'id' (the admin appeal serial number from search_admin_appeals).
    const inputSchema = z.object({
      id: z
        .string()
        .min(1)
        .describe(
          "행정심판 재결례 일련번호 (search_admin_appeals 결과의 [id=N])"
        ),
    });
  • TypeScript interface for the raw API response data from the lawService 'decc' endpoint.
    interface AdminAppealData {
      행정심판례일련번호?: string;
      사건번호?: string;
      사건명?: string;
      재결청?: string;
      처분청?: string;
      처분일자?: string;
      의결일자?: string;
      재결례유형명?: string;
      재결례유형코드?: string;
      청구취지?: string;
      재결요지?: string;
      이유?: string;
      주문?: string;
    }
  • Import of getAdminAppealText into the central tool registry.
    import { getAdminAppealText } from "./primitives/get-admin-appeal-text.js";
  • Registration of getAdminAppealText in the ALL_TOOLS array, under 'W2 — get text primitives'.
    getAdminAppealText,
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that long reasons are automatically summarized ('긴 이유는 자동 축약'), which is a key behavioral trait. It also lists extracted fields, adding transparency about output. Could mention whether full response is truncated or paginated, but overall good.

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 concise (about 3-4 sentences), front-loaded with the core purpose, and each sentence adds value. No wasted words.

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?

For a single-parameter retrieval tool with no output schema and no annotations, the description provides sufficient context: purpose, extracted fields, auto-summary behavior, and pointers to related tools. It is complete for an agent to use correctly.

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 input schema has one parameter (id) with a description stating it's the serial number from search_admin_appeals. Schema coverage is 100%, so the description adds no additional semantic meaning beyond the schema. Baseline score of 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 retrieves the full text of an administrative appeal decision (행정심판 재결례 본문) and lists specific data extracted (case name, appeal agency, etc.). It distinguishes itself from sibling tools like search_admin_appeals.

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?

The description explicitly recommends alternatives: use search_admin_appeals for similar cases and get_pipc_decision_text for original PIPC decisions. It also mentions automatic summarization of long reasons, guiding when to expect truncated output.

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