list_taxlaw_basic_ruling_laws
Retrieve a list of basic ruling laws from the Korean National Tax Service database to obtain law IDs for accessing detailed tax law texts. Filter by law name as needed.
Instructions
국세법령정보시스템 기본통칙 법령 목록 조회. get_taxlaw_basic_ruling_text의 lawId 확보용.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | 법령명 필터. 예: 법인세, 소득세 |
Implementation Reference
- src/index.ts:579-606 (registration)Tool registration in the tools array defining the name, description, and input schema for list_taxlaw_basic_ruling_laws
{ name: "list_taxlaw_basic_ruling_laws", description: "국세법령정보시스템 기본통칙 법령 목록 조회. get_taxlaw_basic_ruling_text의 lawId 확보용.", inputSchema: { type: "object", properties: { query: { type: "string", description: "법령명 필터. 예: 법인세, 소득세" }, }, required: [], additionalProperties: false, }, }, { name: "get_taxlaw_basic_ruling_text", description: "국세법령정보시스템 기본통칙 본문 조회. list_taxlaw_basic_ruling_laws 결과의 lawId 사용.", inputSchema: { type: "object", properties: { lawId: { type: "string", description: "기본통칙 법령 ID(ntstBscId)" }, year: { type: "string", pattern: "^\\d{4}$", description: "연도. 미입력 시 최신 연도" }, query: { type: "string", description: "통칙 제목/본문 내 필터" }, display: { type: "number", minimum: 1, maximum: 200, default: 30 }, full: { type: "boolean", default: false }, }, required: ["lawId"], additionalProperties: false, }, }, - src/index.ts:73-75 (schema)Input argument interface for the list_taxlaw_basic_ruling_laws tool
interface BasicRulingLawArgs { query?: string } - src/index.ts:1553-1571 (handler)Handler function that calls ASISTD001MR01 action to fetch list of basic ruling laws and filters by optional query
async function listTaxlawBasicRulingLaws(args: BasicRulingLawArgs): Promise<ToolResponse> { const data = await postTaxlawAction<BasicRulingData>("ASISTD001MR01", {}, "/st/USESTD001M.do") const query = cleanText(args.query).toLowerCase() const laws = (data.ASISTD001MR01?.bscExrDVOList || []) .filter((item) => !query || cleanText(item.ntstNm).toLowerCase().includes(query)) if (laws.length === 0) { return notFoundResponse(`기본통칙 법령 목록에서 '${args.query || "(전체)"}' 결과가 없습니다.`) } const lines = [ "국세법령정보시스템 기본통칙 법령 목록", `출처: ${TAXLAW_BASE}/st/USESTD001M.do`, "", ] laws.forEach((law) => lines.push(`[${law.ntstBscId || "N/A"}] ${cleanText(law.ntstNm) || "N/A"}`)) lines.push("", "상세: get_taxlaw_basic_ruling_text의 lawId에 위 ID를 사용하세요.") return textResponse(lines.join("\n")) } - src/index.ts:206-214 (helper)BasicRulingItem interface used by listTaxlawBasicRulingLaws to type the returned law items
interface BasicRulingItem { ntstBscId?: string ntstNm?: string rgtYr?: string ntstExrBaseSn?: string ntstTextNm?: string ntstTextCntn?: string lawClCd?: string } - src/index.ts:1910-1911 (registration)Dispatch call in handleToolCall routing the tool name to the handler function
if (name === "list_taxlaw_basic_ruling_laws") { return await listTaxlawBasicRulingLaws(input as BasicRulingLawArgs)