Skip to main content
Glama

search_taxlaw_forms

Search and retrieve tax law forms from the National Tax Service database by keyword, form kind, law ID, and pagination options.

Instructions

국세법령정보시스템 별표/서식 검색. 전체 서식, 별표, 법령서식, 훈령서식, 자주찾는서식을 탐색.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo별표/서식명 검색어
kindNoall
lawIdNo특정 법령 ID(ntstBscId). 미입력 시 전체
displayNo
pageNo

Implementation Reference

  • Input schema type for search_taxlaw_forms tool.
    interface FormsSearchArgs {
      query?: string
      kind?: string
      lawId?: string
      display?: number
      page?: number
    }
  • Type definition for form items returned by the search.
    interface FormItem {
      ntstBscId?: string
      ntstBrkdId?: string
      ntstNm?: string
      ntstSysClCd?: string
      ntstPmgDt?: string
      ntstAtFrmlSn?: number | string
      ntstAtFrmlClCd?: string
      ntstAtFrmlAtNo?: string
      ntstAtFrmlNo?: string
      ntstAtFrmlNm?: string
      ntstClNm?: string
      ntar?: string
      ntarBscId?: string
      ntarBrkdId?: string
      ntarClCd?: string
      ntarNm?: string
      ntarPmgNo?: string
      ntarPmgDt?: string
      ntarFrmlSn?: string
      ntarFrmlNo?: string
      ntarFrmlNm?: string
      frmlNm?: string
      ntstBkmrFrmlClCd?: string
      ntstBkmrFrmlDetailClNm?: string
      ntstSjtClNm?: string
      stttInfpClCd?: string
      fleId?: string
    }
  • src/index.ts:607-622 (registration)
    Tool registration/definition with name and input schema. Listed in the tools array.
    {
      name: "search_taxlaw_forms",
      description: "국세법령정보시스템 별표/서식 검색. 전체 서식, 별표, 법령서식, 훈령서식, 자주찾는서식을 탐색.",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "별표/서식명 검색어" },
          kind: { type: "string", enum: ["all", "all_forms", "annex", "form", "legal_form", "instruction_form", "favorite_form"], default: "all" },
          lawId: { type: "string", description: "특정 법령 ID(ntstBscId). 미입력 시 전체" },
          display: { type: "number", minimum: 1, maximum: 50, default: 20 },
          page: { type: "number", minimum: 1, default: 1 },
        },
        required: [],
        additionalProperties: false,
      },
    },
  • Main handler function for search_taxlaw_forms. Resolves kinds, searches each form kind via the NTS API, and formats results.
    async function searchTaxlawForms(args: FormsSearchArgs): Promise<ToolResponse> {
      const kinds = formKinds(args.kind)
      const results = await Promise.all(kinds.map((entry) => searchFormsKind(entry, args)))
      const total = results.reduce((sum, entry) => sum + Number(entry.result.recordCount || 0), 0)
    
      if (total === 0) {
        return notFoundResponse(`국세법령정보시스템 별표/서식 '${args.query || "(전체)"}' 검색 결과가 없습니다.`)
      }
    
      const lines = [
        "국세법령정보시스템 별표/서식 검색 결과",
        `출처: ${results.map((entry) => `${TAXLAW_BASE}${SITE_MENU_ACTIONS.find((menu) => menu.highLevelTool?.includes(`kind=${entry.kind}`))?.path || ""}`).filter(Boolean).join(", ") || `${TAXLAW_BASE}/af`}`,
        `검색어: ${args.query || "(전체)"} / 종류: ${kinds.map(formKindLabel).join(", ")} / 총 ${total.toLocaleString()}건`,
        "",
      ]
      for (const entry of results) {
        const list = formResultList(entry.kind, entry.result)
        lines.push(`## ${formKindLabel(entry.kind)}: ${Number(entry.result.recordCount || 0).toLocaleString()}건`)
        if (list.length === 0) {
          lines.push("[NOT_FOUND] 표시 가능한 결과가 없습니다.", "")
          continue
        }
        list.forEach((item) => lines.push(formatFormItem(entry.kind, item), ""))
      }
      return textResponse(truncate(lines.join("\n"), 50000))
    }
  • Helper function that calls the NTS action.do API for a specific form kind.
    async function searchFormsKind(kind: FormKind, args: FormsSearchArgs): Promise<{ kind: FormKind; result: FormSearchResult }> {
      const pageIndex = asPositiveInt(args.page, 1)
      const recordCountPerPage = asPositiveInt(args.display, 20, 50)
      let actionId = ""
      let referer = ""
      let params: AnyRecord = {}
    
      if (kind === "all_forms") {
        actionId = "ASIAFE001MR01"
        referer = "/af/USEAFE001M.do"
        params = { searchFrmlNm: args.query || "", pageIndex, recordCountPerPage }
      } else if (kind === "annex" || kind === "legal_form") {
        actionId = kind === "annex" ? "ASIAFA001MR01" : "ASIAFB001MR01"
        referer = kind === "annex" ? "/af/USEAFA001M.do" : "/af/USEAFB001M.do"
        params = {
          searchFrmlNm: args.query || "",
          searchNtstBscId: args.lawId || "stttAll",
          pageIndex,
          recordCountPerPage,
          srtFeld: "btn_sortPmgDt",
          srtMthd: "desc",
        }
      } else if (kind === "instruction_form") {
        actionId = "ASIAFC001MR01"
        referer = "/af/USEAFC001M.do"
        params = {
          searchNtarTlawClCd: "all",
          searchFrmlNm: args.query || "",
          pageIndex,
          recordCountPerPage,
          srtFeld: "btn_sortPmgDt",
          srtMthd: "desc",
        }
      } else {
        actionId = "ASIAFD001MR01"
        referer = "/af/USEAFD001M.do"
        params = {
          searchBkmrTlawClCd: "all",
          searchFrmlNm: args.query || "",
          ntstBkmrFrmlClCd: "10",
          pageIndex,
          recordCountPerPage,
        }
      }
    
      const data = await postTaxlawAction<FormsData>(actionId, params, referer)
      const result = data[actionId as keyof FormsData] as FormSearchResult | undefined
      return { kind, result: result || {} }
    }
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states the search action and content type, but does not mention pagination, result format, permissions, or any side effects (though it is read-only by nature). The minimal description does not sufficiently inform the agent of the tool's behavior beyond its basic function.

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 very short (two sentences) and front-loads the purpose. It is concise but could include more useful information without being lengthy. The structure is acceptable for its brevity.

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

Completeness1/5

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

For a tool with 5 parameters and no output schema, the description is far from complete. It lacks details on how parameters work, what the return value contains, pagination, and how 'kind' filters results. Users (or agents) would need to guess or consult external sources.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 5 parameters with only 40% description coverage (query and lawId have descriptions, kind/display/page do not). The description adds no additional meaning to the parameters or their usage. It does not compensate for the missing schema descriptions.

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?

Description explicitly states it searches for '별표/서식' (appendix/forms) in the tax law information system, and lists the types of forms covered: all forms, appendix, legal forms, instruction forms, frequently searched forms. This clearly distinguishes it from sibling tools like search_taxlaw_documents or search_taxlaw_interpretations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies the tool is for searching tax law forms but gives no explicit guidance on when to use it versus alternatives like search_taxlaw_all or search_taxlaw_documents. No when-to-use or when-not-to-use information is provided.

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