Skip to main content
Glama

get_admin_appeal_text

Retrieve the full text of Korean administrative appeal precedents by providing the case series number.

Instructions

[행심] 행정심판례 전문.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes행정심판재결례일련번호 (검색 결과에서 획득)
caseNameNo사건명 (선택사항, 검증용)
apiKeyNo법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달

Implementation Reference

  • The main handler function for the 'get_admin_appeal_text' tool. It takes an 'id' (required) and optional 'caseName'/'apiKey', fetches the full text of an administrative appeal decision from the API, parses the JSON response, and formats the output with details like case number, dates, ruling summary, and reasoning.
    export async function getAdminAppealText(
      apiClient: LawApiClient,
      args: GetAdminAppealTextInput
    ): Promise<{ content: Array<{ type: string, text: string }>, isError?: boolean }> {
      try {
        const extraParams: Record<string, string> = { ID: args.id };
        if (args.caseName) extraParams.LM = args.caseName;
    
        const responseText = await apiClient.fetchApi({
          endpoint: "lawService.do",
          target: "decc",
          type: "JSON",
          extraParams,
          apiKey: args.apiKey,
        });
    
        let data: any;
        try {
          data = JSON.parse(responseText);
        } catch (err) {
          throw new Error("Failed to parse JSON response from API");
        }
    
        if (!data.DeccService && !data.행정심판례) {
          throw new Error("행정심판례를 찾을 수 없거나 응답 형식이 올바르지 않습니다.");
        }
    
        const appeal = data.DeccService || data.행정심판례;
    
        let output = `=== ${appeal.사건명 || "행정심판례"} ===\n\n`;
    
        output += `📋 기본 정보:\n`;
        output += `  사건번호: ${appeal.사건번호 || "N/A"}\n`;
        output += `  처분일자: ${appeal.처분일자 || "N/A"}\n`;
        output += `  의결일자: ${appeal.의결일자 || "N/A"}\n`;
        output += `  처분청: ${appeal.처분청 || "N/A"}\n`;
        output += `  재결청: ${appeal.재결청 || "N/A"}\n`;
        output += `  재결례유형: ${appeal.재결례유형명 || "N/A"}\n`;
        output += `\n`;
    
        if (appeal.주문) {
          output += `📌 주문:\n${appeal.주문}\n\n`;
        }
    
        if (appeal.청구취지) {
          output += `📝 청구취지:\n${appeal.청구취지}\n\n`;
        }
    
        if (appeal.재결요지) {
          output += `📋 재결요지:\n${appeal.재결요지}\n\n`;
        }
    
        if (appeal.이유) {
          output += `📄 이유:\n${appeal.이유}\n`;
        }
    
        return {
          content: [{
            type: "text",
            text: truncateResponse(output)
          }]
        };
      } catch (error) {
        return formatToolError(error, "get_admin_appeal_text")
      }
    }
  • Zod schema defining the input for 'getAdminAppealText': 'id' (required string, the administrative appeal case serial number), 'caseName' (optional string for verification), and 'apiKey' (optional string).
    export const getAdminAppealTextSchema = z.object({
      id: z.string().describe("행정심판재결례일련번호 (검색 결과에서 획득)"),
      caseName: z.string().optional().describe("사건명 (선택사항, 검증용)"),
      apiKey: z.string().optional().describe("법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달"),
    });
  • Registration of the tool in the tool registry. Maps the tool name 'get_admin_appeal_text' to its schema and handler function.
    {
      name: "get_admin_appeal_text",
      description: "[행심] 행정심판례 전문.",
      schema: getAdminAppealTextSchema,
      handler: getAdminAppealText
    },
  • Tool chain configuration linking 'search_admin_appeals' to its detail tool 'get_admin_appeal_text', specifying that the 'id' parameter is passed via the BRACKET_ID regex.
    search_admin_appeals: {
      detailTool: "get_admin_appeal_text",
  • TypeScript type inferred from the Zod schema for type safety in the handler function.
    export type GetAdminAppealTextInput = z.infer<typeof getAdminAppealTextSchema>;
Behavior2/5

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

The description only mentions it returns 'full text', but lacks details on authorization, rate limits, error handling, or behavior for invalid inputs. Without annotations, more transparency is needed.

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 a single concise line. It could be more informative without losing conciseness.

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

Completeness3/5

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

The description is minimally adequate for a simple get-text tool, but given the large number of similar siblings and no output schema, it lacks context about prerequisites and output format.

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%, so baseline is 3. The description adds no extra meaning beyond the schema's parameter descriptions.

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 it retrieves the full text of an administrative appeal case. The verb is implied and the resource is specific, but it does not differentiate from sibling tools like get_appeal_review_decision_text.

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?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites or context for invocation.

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/workbookbulb863/korean-law-alio-mcp'

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