Skip to main content
Glama

get_taxlaw_hometax_counsel_text

Retrieve the full text of a specific home tax counsel case from the National Tax Service database using the ID obtained from search results.

Instructions

국세법령정보시스템 홈택스 상담사례 상세 조회. search_taxlaw_all의 hometaxCnslThan 결과 ID/REQ_STD_ID를 사용.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes통합검색 홈택스 상담사례 결과의 ID 또는 REQ_STD_ID. 예: 369

Implementation Reference

  • The handler function `getTaxlawHometaxCounselText` that executes the tool logic. It takes an `id` parameter, calls the ASEISA004MR01 action on the taxlaw API, and formats the response (title, type, date, answer content).
    async function getTaxlawHometaxCounselText(args: HometaxCounselArgs): Promise<ToolResponse> {
      const id = requireString("id", args.id)
      const referer = `/is/USEISA004P.do?reqStdId=${encodeURIComponent(id)}`
      const data = await postTaxlawAction<HometaxCounselData>(
        "ASEISA004MR01",
        { reqStdId: id },
        referer,
      )
      const item = data.ASEISA004MR01
      if (!item || !item.reqStdId) {
        return notFoundResponse(`국세법령정보시스템 홈택스 상담사례 상세를 찾을 수 없습니다: ${id}`, [
          "search_taxlaw_all에서 hometaxCnslThan 결과의 ID를 다시 확인하세요.",
        ])
      }
    
      const answer = cleanText(item.answerStdContent)
      const lines = [
        `=== ${cleanText(item.stdTitle) || "(제목 없음)"} ===`,
        "",
        "기본 정보:",
        `  ID: ${item.reqStdId}`,
        `  상담유형: ${cleanText(item.reqTpNm) || "N/A"}`,
        `  등록일자: ${normalizeDate(item.regstDt)}`,
        `  출처: ${TAXLAW_BASE}${referer}`,
        "",
        "답변:",
        answer || "N/A",
      ]
      return textResponse(truncate(lines.join("\n"), 30000))
    }
  • The `HometaxCounselArgs` interface that defines the input schema for the tool, accepting an optional `id` string.
    interface HometaxCounselArgs {
      id?: string
    }
  • The `HometaxCounselData` and `HometaxCounselItem` interfaces that define the response data structure from the API (reqStdId, regstDt, reqTpNm, stdTitle, answerStdContent).
    interface HometaxCounselData {
      ASEISA004MR01?: HometaxCounselItem
    }
    
    interface HometaxCounselItem {
      reqStdId?: string
      regstDt?: string
      reqTpNm?: string
      stdTitle?: string
      answerStdContent?: string
    }
  • src/index.ts:496-506 (registration)
    The tool registration/definition in the `tools` array, including its name, description, and input JSON schema (requiring an `id` string).
      name: "get_taxlaw_hometax_counsel_text",
      description: "국세법령정보시스템 홈택스 상담사례 상세 조회. search_taxlaw_all의 hometaxCnslThan 결과 ID/REQ_STD_ID를 사용.",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "string", description: "통합검색 홈택스 상담사례 결과의 ID 또는 REQ_STD_ID. 예: 369" },
        },
        required: ["id"],
        additionalProperties: false,
      },
    },
  • src/index.ts:1892-1894 (registration)
    The routing/registration in `handleToolCall` that dispatches the 'get_taxlaw_hometax_counsel_text' tool name to the handler function.
    if (name === "get_taxlaw_hometax_counsel_text") {
      return await getTaxlawHometaxCounselText(input as HometaxCounselArgs)
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states 'detailed inquiry,' implying a read operation, but does not disclose any behavioral traits such as idempotency, error conditions, or rate limits.

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?

The description is a single sentence that efficiently communicates purpose and parameter origin. No unnecessary words, front-loaded with the action and object.

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?

For a simple retrieval tool with one parameter and no output schema, the description adequately covers what and how. It mentions the ID source but does not specify the output format (presumably text), which could be inferred.

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

Parameters4/5

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

Input schema has one parameter with a description including an example. The tool description adds context by specifying the ID originates from search_taxlaw_all results, enhancing understanding beyond the schema alone.

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 states the tool retrieves detailed text of a Home Tax counseling case from the National Tax Law Information System. It distinguishes from sibling tools by specifying the document type (hometax counsel) and mentions the ID source from search_taxlaw_all results.

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 provides a clear usage scenario: use the ID from search_taxlaw_all's hometaxCnslThan results. It does not explicitly state when not to use, but the context of sibling tools for different document types implies exclusivity.

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