Skip to main content
Glama

get_tax_tribunal_decision_text

Retrieve the full text of a Korean tax tribunal decision by its serial number. Use it to access official decision documents for legal research or case review.

Instructions

[조세심판] 조세심판 결정례 전문.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTax tribunal decision serial number (특별행정심판재결례일련번호) from search results
decisionNameNoDecision name (optional, for verification)
apiKeyNo법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달

Implementation Reference

  • Handler function that fetches the full text of a tax tribunal decision by ID from the lawService.do API endpoint (target: ttSpecialDecc). Parses JSON response, formats basic info (case name, number, dates, court) and content (summary, order, reasoning, related statutes) into a readable text output.
    export async function getTaxTribunalDecisionText(
      apiClient: LawApiClient,
      args: GetTaxTribunalDecisionTextInput
    ): Promise<{ content: Array<{ type: string, text: string }>, isError?: boolean }> {
      try {
        const extraParams: Record<string, string> = { ID: args.id };
        if (args.decisionName) extraParams.LM = args.decisionName;
    
        const responseText = await apiClient.fetchApi({
          endpoint: "lawService.do",
          target: "ttSpecialDecc",
          type: "JSON",
          extraParams,
          apiKey: args.apiKey,
        });
    
        let data: any;
        try {
          data = JSON.parse(responseText);
        } catch (err) {
          throw new Error("Failed to parse JSON response from API");
        }
    
        if (!data.SpecialDeccService) {
          throw new Error("Tax tribunal decision not found or invalid response format");
        }
    
        const decc = data.SpecialDeccService;
        const basic = {
          사건명: decc.사건명,
          사건번호: decc.사건번호,
          청구번호: decc.청구번호,
          처분일자: decc.처분일자,
          의결일자: decc.의결일자,
          처분청: decc.처분청,
          재결청: decc.재결청,
          재결례유형명: decc.재결례유형명,
          세목: decc.세목
        };
        const content = {
          재결요지: decc.재결요지,
          따른결정: decc.따른결정,
          참조결정: decc.참조결정,
          주문: decc.주문,
          청구취지: decc.청구취지,
          이유: decc.이유,
          관련법령: decc.관련법령
        };
    
        let output = `=== ${basic.사건명 || "Tax Tribunal Decision"} ===\n\n`;
    
        output += `📋 기본 정보:\n`;
        output += `  사건번호: ${basic.사건번호 || "N/A"}\n`;
        output += `  청구번호: ${basic.청구번호 || "N/A"}\n`;
        output += `  처분일자: ${basic.처분일자 || "N/A"}\n`;
        output += `  의결일자: ${basic.의결일자 || "N/A"}\n`;
        output += `  처분청: ${basic.처분청 || "N/A"}\n`;
        output += `  재결청: ${basic.재결청 || "N/A"}\n`;
        output += `  재결유형: ${basic.재결례유형명 || "N/A"}\n`;
        output += `  세목: ${basic.세목 || "N/A"}\n\n`;
    
        if (content.재결요지) {
          output += `📌 재결요지:\n${content.재결요지}\n\n`;
        }
    
        if (content.주문) {
          output += `⚖️ 주문:\n${content.주문}\n\n`;
        }
    
        if (content.청구취지) {
          output += `📝 청구취지:\n${content.청구취지}\n\n`;
        }
    
        if (content.이유) {
          output += `📄 이유:\n${content.이유}\n\n`;
        }
    
        if (content.따른결정) {
          output += `🔗 따른결정:\n${content.따른결정}\n\n`;
        }
    
        if (content.참조결정) {
          output += `📖 참조결정:\n${content.참조결정}\n\n`;
        }
    
        if (content.관련법령) {
          output += `📚 관련법령:\n${content.관련법령}\n`;
        }
    
        return {
          content: [{
            type: "text",
            text: truncateResponse(output)
          }]
        };
      } catch (error) {
        return formatToolError(error, "get_tax_tribunal_decision_text");
      }
    }
  • Zod schema defining the input parameters for getTaxTribunalDecisionText: id (required), decisionName (optional), and apiKey (optional).
    export const getTaxTribunalDecisionTextSchema = z.object({
      id: z.string().describe("Tax tribunal decision serial number (특별행정심판재결례일련번호) from search results"),
      decisionName: z.string().optional().describe("Decision name (optional, for verification)"),
      apiKey: z.string().optional().describe("법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달"),
    });
  • Registration of the tool in the tool registry with name, description, schema, and handler mapping.
    {
      name: "get_tax_tribunal_decision_text",
      description: "[조세심판] 조세심판 결정례 전문.",
      schema: getTaxTribunalDecisionTextSchema,
      handler: getTaxTribunalDecisionText
    },
  • Tool chain configuration mapping search_tax_tribunal_decisions to this detail tool, enabling automatic retrieval of full text from search results using the [ID] format.
    search_tax_tribunal_decisions: {
      detailTool: "get_tax_tribunal_decision_text",
      detailParam: "id",
      idRegex: BRACKET_ID,
    },
Behavior2/5

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

With no annotations, the description carries full burden. It only states the tool gets full text but does not disclose behavioral traits such as authentication needs (apiKey parameter mentioned only in schema), rate limits, or output format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (one sentence) and to the point, but it lacks depth. While concise in word count, it does not earn its place fully as it fails to convey important details for tool usage.

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

Completeness2/5

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

The description is incomplete given the absence of an output schema and minimal behavioral disclosure. It does not explain what the tool returns (e.g., format, structure) or any side effects, leaving agents insufficiently informed.

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 description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema, but it does not contradict or omit information either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states that the tool retrieves the full text (전문) of tax tribunal decisions, which clearly identifies the action and resource. However, it does not explicitly distinguish itself from siblings like 'search_tax_tribunal_decisions', though the verb 'get' implies retrieval vs search.

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

Usage Guidelines2/5

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

No usage guidance is provided. The description does not specify when to use this tool versus alternatives (e.g., search_tax_tribunal_decisions) or any prerequisites or context.

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/workbookbulb863/korean-law-alio-mcp'

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