get_appeal_review_decision_text
Retrieve the full text of a specific appeal review decision from the Appeal Review Committee using its unique ID. Enables access to official decision records.
Instructions
[소청심사] 소청심사위원회 재결례 전문.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 특별행정심판재결례일련번호 (검색 결과에서 획득) | |
| apiKey | No | 법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달 |
Implementation Reference
- The main handler for the get_appeal_review_decision_text tool. Delegates to getSpecialAppealText with target 'adapSpecialDecc' and label '소청심사위원회 재결례'.
export async function getAppealReviewDecisionText(apiClient: LawApiClient, args: GetAppealReviewDecisionTextInput) { return getSpecialAppealText(apiClient, args, "adapSpecialDecc", "소청심사위원회 재결례"); } - Shared helper function that fetches the appeal review decision text from the lawService.do endpoint with target 'adapSpecialDecc', parses the JSON response from SpecialDeccService, and formats the decision details (case info, ruling summary, order, claim, reasoning, etc.).
async function getSpecialAppealText( apiClient: LawApiClient, args: { id: string; apiKey?: string }, target: string, label: string ): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> { try { const responseText = await apiClient.fetchApi({ endpoint: "lawService.do", target, type: "JSON", extraParams: { ID: args.id }, apiKey: args.apiKey, }); let data: any; try { data = JSON.parse(responseText); } catch { throw new Error("Failed to parse JSON response from API"); } if (!data.SpecialDeccService) { throw new Error(`${label}을(를) 찾을 수 없거나 응답 형식이 올바르지 않습니다.`); } const decc = data.SpecialDeccService; let output = `=== ${decc.사건명 || label} ===\n\n`; output += `기본 정보:\n`; output += ` 사건번호: ${decc.사건번호 || "N/A"}\n`; if (decc.청구번호) output += ` 청구번호: ${decc.청구번호}\n`; if (decc.처분일자) output += ` 처분일: ${decc.처분일자}\n`; if (decc.의결일자) output += ` 의결일: ${decc.의결일자}\n`; if (decc.처분청) output += ` 처분청: ${decc.처분청}\n`; if (decc.재결청) output += ` 재결청: ${decc.재결청}\n`; if (decc.재결례유형명) output += ` 유형: ${decc.재결례유형명}\n`; output += `\n`; if (decc.재결요지) output += `재결요지:\n${decc.재결요지}\n\n`; if (decc.주문) output += `주문:\n${decc.주문}\n\n`; if (decc.청구취지) output += `청구취지:\n${decc.청구취지}\n\n`; if (decc.이유) output += `이유:\n${decc.이유}\n\n`; if (decc.따른결정) output += `따른결정:\n${decc.따른결정}\n\n`; if (decc.참조결정) output += `참조결정:\n${decc.참조결정}\n\n`; if (decc.관련법령) output += `관련법령:\n${decc.관련법령}\n`; return { content: [{ type: "text", text: truncateResponse(output) }] }; } catch (error) { return formatToolError(error, `get_${target}_text`); } } - Zod schema for the tool. Expects an 'id' (string, required) and optional 'apiKey' (string).
export const getAppealReviewDecisionTextSchema = z.object(baseTextSchema); export type GetAppealReviewDecisionTextInput = z.infer<typeof getAppealReviewDecisionTextSchema>; - Base schema definition shared by all special appeal text tools, defining the 'id' and 'apiKey' fields.
const baseTextSchema = { id: z.string().describe("특별행정심판재결례일련번호 (검색 결과에서 획득)"), apiKey: z.string().optional().describe("법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달"), }; - src/tool-registry.ts:472-477 (registration)Registration of the tool in the central tool registry with name 'get_appeal_review_decision_text', description, schema, and handler reference.
{ name: "get_appeal_review_decision_text", description: "[소청심사] 소청심사위원회 재결례 전문.", schema: getAppealReviewDecisionTextSchema, handler: getAppealReviewDecisionText },