Skip to main content
Glama

search_taxlaw_all

Search Korean tax law data from the National Tax Service: statutes, interpretations, precedents, forms, publications, and Hometax consultation cases.

Instructions

국세법령정보시스템 통합검색. 법제처 API에 없는 국세청 자료까지 보완 탐색: 별표서식, 국세법령, 세법해석/질의, 판례·결정례, 발간책자, 홈택스 상담사례. korean-law-mcp(법제처 DB)와 병용 권장 — 법조문 본문은 korean-law-mcp의 get_law_text가 정확하고, 본 도구의 statute 컬렉션은 메타·인용 위주.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes검색어. 예: 업무용승용차, 법인세 접대비
collectionsNo검색 컬렉션. all=전체, appendForm=별표서식, statute=국세법령, question=세법해석/질의, precedent=판례·결정례, formerLibrary=발간책자, hometaxCnslThan=홈택스 상담사례all
displayPerCollectionNo
pageNo
sortNoscore
fromDateNo검색 시작일 YYYYMMDD
toDateNo검색 종료일 YYYYMMDD
taxLawCodeNo세목 코드. 예: 303=법인세, 305=종합소득세
synonymNo동의어 검색 사용 여부

Implementation Reference

  • src/index.ts:431-457 (registration)
    Tool definition/registration in the tools array. Defines the name, description, and JSON schema for 'search_taxlaw_all' tool.
    {
      name: "search_taxlaw_all",
      description: "국세법령정보시스템 통합검색. 법제처 API에 없는 국세청 자료까지 보완 탐색: 별표서식, 국세법령, 세법해석/질의, 판례·결정례, 발간책자, 홈택스 상담사례. korean-law-mcp(법제처 DB)와 병용 권장 — 법조문 본문은 korean-law-mcp의 get_law_text가 정확하고, 본 도구의 statute 컬렉션은 메타·인용 위주.",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "검색어. 예: 업무용승용차, 법인세 접대비" },
          collections: {
            oneOf: [
              { type: "string", enum: ["all", ...INTEGRATED_COLLECTIONS] },
              { type: "array", items: { type: "string", enum: ["all", ...INTEGRATED_COLLECTIONS] } },
            ],
            default: "all",
            description: "검색 컬렉션. all=전체, appendForm=별표서식, statute=국세법령, question=세법해석/질의, precedent=판례·결정례, formerLibrary=발간책자, hometaxCnslThan=홈택스 상담사례",
          },
          displayPerCollection: { type: "number", minimum: 1, maximum: 10, default: 3 },
          page: { type: "number", minimum: 1, default: 1 },
          sort: { type: "string", enum: ["score", "date_desc"], default: "score" },
          fromDate: { type: "string", pattern: "^\\d{8}$", description: "검색 시작일 YYYYMMDD" },
          toDate: { type: "string", pattern: "^\\d{8}$", description: "검색 종료일 YYYYMMDD" },
          taxLawCode: { type: "string", description: "세목 코드. 예: 303=법인세, 305=종합소득세" },
          synonym: { type: "boolean", default: false, description: "동의어 검색 사용 여부" },
        },
        required: ["query"],
        additionalProperties: false,
      },
    },
  • Handler function that executes the 'search_taxlaw_all' tool logic. It validates inputs, constructs API parameters, calls the NTS integrated search action (ASEISA001MR01), and formats results per collection.
    async function searchTaxlawAll(args: IntegratedSearchArgs): Promise<ToolResponse> {
      const query = requireString("query", args.query)
      validateDateRange(args.fromDate, args.toDate)
    
      const collections = integratedCollections(args.collections)
      const display = asPositiveInt(args.displayPerCollection, 3, 10)
      const page = asPositiveInt(args.page, 1)
      const sort = integratedSort(args.sort)
      const params: AnyRecord = {
        schVcb: query,
        startCount: page,
        collection: collections.join(","),
        wnKey: "",
        searchType: "",
        sortField: sort,
        viewCount: String(display),
        ntstTlawClCdList: args.taxLawCode ? [args.taxLawCode] : [],
        icldVcbCtl: [],
        exclVcbCtl: [],
        rltnStttCtl: [],
        schDtBase: "",
        prtsSprcChiefJdgmYn: "",
        prtsAttrYrCtl: [],
        prtsPrgrStatCtl: [],
        prtsLwsDfntYn: "",
        mainIdCtl: [],
        useSynonymYn: args.synonym ? "Y" : "N",
      }
      if (args.fromDate) params.bltnStrtDtm = `${args.fromDate}000000`
      if (args.toDate) params.bltnEndDtm = `${args.toDate}999999`
    
      const data = await postTaxlawAction<IntegratedSearchData>(
        "ASEISA001MR01",
        params,
        `/is/USEISA001M.do?schVcb=${encodeURIComponent(query)}`,
      )
      const search = data.ASEISA001MR01.searchResultVO
      const list = search?.collectionList || []
      const total = list.reduce((sum, col) => sum + Number(col.totalCount || 0), 0)
    
      if (total === 0) {
        return notFoundResponse(`국세법령정보시스템 통합검색 '${query}' 결과가 없습니다.`, [
          "검색어를 더 짧게 줄여 재검색하세요.",
          "세법해석/판례만 필요하면 search_taxlaw_documents를 사용하세요.",
          "법제처 해석례·감사원 심사청구·납세자보호위원회 심의사례·평가심의사례는 통합검색에 포함되지 않습니다. list_taxlaw_site_menus에서 actionId를 확인 후 call_taxlaw_action으로 조회하세요.",
          "법조문 본문 자체가 필요한 경우 NTS의 statute 컬렉션은 본문 인덱싱이 약하므로 korean-law-mcp의 search_law + get_law_text(jo=...)로 직접 조회하는 것이 확실합니다.",
          "판례·해석례·조세심판이 NTS에 없으면 korean-law-mcp의 search_decisions(domain=precedent/interpretation/tax_tribunal)도 함께 시도하세요(두 시스템은 인덱싱 범위가 달라 한쪽만 회수되는 경우가 흔함).",
        ])
      }
    
      const lines = [
        `국세법령정보시스템 통합검색 결과: "${query}"`,
        `출처: ${TAXLAW_BASE}/is/USEISA001M.do`,
        `검색 컬렉션: ${collections.join(", ")} / 총 ${total.toLocaleString()}건 / page=${page}`,
        "주의: 아래 결과는 국세법령정보시스템 action.do 응답에서 온 실제 항목만 표시합니다.",
        "",
      ]
    
      for (const collection of list) {
        const nameKr = collection.nameKr || collection.nameEn || "컬렉션"
        const nameEn = collection.nameEn || ""
        const count = Number(collection.totalCount || 0)
        lines.push(`## ${nameKr}${nameEn ? ` (${nameEn})` : ""}: ${count.toLocaleString()}건`)
        const rows = collection.resultList || []
        if (rows.length === 0) {
          lines.push("[NOT_FOUND] 이 컬렉션의 표시 가능한 결과가 없습니다.", "")
          continue
        }
        rows.slice(0, display).forEach((row) => {
          lines.push(formatIntegratedRow(row, nameEn), "")
        })
      }
    
      return textResponse(truncate(lines.join("\n"), 50000))
    }
  • TypeScript interface defining the input arguments schema for search_taxlaw_all.
    interface IntegratedSearchArgs {
      query?: string
      collections?: string[] | string
      displayPerCollection?: number
      page?: number
      sort?: string
      fromDate?: string
      toDate?: string
      taxLawCode?: string
      synonym?: boolean
    }
  • Call routing in handleToolCall: dispatches the 'search_taxlaw_all' name to the searchTaxlawAll handler function.
    async function handleToolCall(name: string, args: unknown): Promise<ToolResponse> {
      try {
        const input = (args || {}) as AnyRecord
        if (name === "search_taxlaw_all") {
          return await searchTaxlawAll(input as IntegratedSearchArgs)
        }
  • Helper function used by searchTaxlawAll to parse and validate the 'collections' parameter.
    function integratedCollections(raw: unknown): string[] {
      const values = Array.isArray(raw)
        ? raw.map(String)
        : raw
          ? [String(raw)]
          : ["all"]
      if (values.includes("all")) return [...INTEGRATED_COLLECTIONS]
    
      const allowed = new Set<string>(INTEGRATED_COLLECTIONS)
      const invalid = values.filter((value) => !allowed.has(value))
      if (invalid.length > 0) {
        throw new TaxlawMcpError(`Unknown collection: ${invalid.join(", ")}`, ErrorCodes.INVALID_PARAM)
      }
      return [...new Set(values)]
    }
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 of disclosure. It honestly states that the statute collection is metadata/citation-focused rather than full text, which is critical behavioral context. It could further mention rate limits or result structure, but the core behavioral trait is transparently communicated.

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?

Two sentences, no wasted words. Front-loaded with purpose and immediately provides distinguishing guidance. Every sentence earns its place.

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

Completeness4/5

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

Given the complexity (9 parameters, many collections, no output schema), the description adequately explains the scope and limitation of statute collection. It does not describe return format or pagination behavior, which would improve completeness, but it is sufficient for an agent to understand the tool's role among siblings.

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 67% with most parameters having descriptions. The description does add value by listing the collections in text, reinforcing the enum options, but does not provide additional semantics beyond schema for other parameters like sort or page. Baseline 3 is appropriate as schema does most of the work.

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 identifies the tool as a comprehensive search of the Korean tax law information system, listing all covered collections. It explicitly distinguishes from sibling tools by noting that for statute text, korean-law-mcp's get_law_text is more accurate, highlighting this tool's complementary role.

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 recommends using this tool in conjunction with korean-law-mcp for precise statute text, providing clear guidance on when to use alternatives. However, it does not explicitly differentiate from the many sibling specialized search tools (e.g., search_taxlaw_interpretations), leaving the agent to infer the generalist vs. specialist distinction.

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/kim-go-chon/taxlaw-nts-mcp'

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