Skip to main content
Glama
boam79

depreciation-mcp

by boam79

세무조정 참고

calc_tax_adjustment

Calculate tax adjustments by comparing book depreciation to tax limits, including prior period carryovers, for Korean corporate tax compliance.

Instructions

회계 감가상각비 vs 세무 상각범위액 → 손금부인·시인부족·추인(단순모형)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
book_depreciationYes
tax_limitYes
carried_over_denialNo전기 이월 손금부인액

Implementation Reference

  • src/index.ts:145-164 (registration)
    Tool 'calc_tax_adjustment' registered with inputSchema and handler that calls calcTaxAdjustmentCore
    server.registerTool(
      "calc_tax_adjustment",
      {
        title: "세무조정 참고",
        description: "회계 감가상각비 vs 세무 상각범위액 → 손금부인·시인부족·추인(단순모형)",
        inputSchema: {
          book_depreciation: z.number(),
          tax_limit: z.number(),
          carried_over_denial: z.number().optional().describe("전기 이월 손금부인액"),
        },
      },
      async (input) => {
        try {
          const out = calcTaxAdjustmentCore(input);
          return { content: [{ type: "text", text: jsonText(out) }] };
        } catch (e) {
          return toolError(e instanceof Error ? e.message : String(e));
        }
      },
    );
  • Core handler function calcTaxAdjustmentCore that computes tax adjustment logic
    export function calcTaxAdjustmentCore(input: {
      book_depreciation: number;
      tax_limit: number;
      carried_over_denial?: number;
    }): TaxAdjustmentOutput {
      const { book_depreciation, tax_limit, carried_over_denial = 0 } = input;
      if (book_depreciation < 0 || tax_limit < 0 || carried_over_denial < 0) {
        throw new Error("book_depreciation, tax_limit, carried_over_denial는 0 이상이어야 합니다.");
      }
      const tax_denial_amount = Math.max(0, book_depreciation - tax_limit);
      const approval_shortage = Math.max(0, tax_limit - book_depreciation);
      const prior_approval_used = Math.min(carried_over_denial, approval_shortage);
      const net_tax_expense = tax_denial_amount - prior_approval_used;
    
      const adjustment_memo = [
        `손금부인액 = max(0, 회계감가상각비(${book_depreciation}) - 세무상각범위액(${tax_limit})) = ${tax_denial_amount}`,
        `시인부족액 = max(0, 세무한도(${tax_limit}) - 회계비용(${book_depreciation})) = ${approval_shortage}`,
        `추인사용액 = min(전기이월손금부인(${carried_over_denial}), 당기시인부족(${approval_shortage})) = ${prior_approval_used}`,
        `순세무효과(단순) = ${net_tax_expense}`,
        DISCLAIMER,
      ].join("\n");
    
      return {
        tax_denial_amount,
        approval_shortage,
        prior_approval_used,
        net_tax_expense,
        adjustment_memo,
      };
    }
  • TaxAdjustmentOutput interface defining the output type
    export interface TaxAdjustmentOutput {
      tax_denial_amount: number;
      approval_shortage: number;
      prior_approval_used: number;
      net_tax_expense: number;
      adjustment_memo: string;
    }
  • Input schema for calc_tax_adjustment with book_depreciation, tax_limit, carried_over_denial
    inputSchema: {
      book_depreciation: z.number(),
      tax_limit: z.number(),
      carried_over_denial: z.number().optional().describe("전기 이월 손금부인액"),
    },
  • Usage of calcTaxAdjustmentCore inside bulk calculation utility
    const adj = calcTaxAdjustmentCore({
      book_depreciation: annual_depreciation,
      tax_limit,
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool computes specific adjustments but does not disclose side effects, return format, error handling, or assumptions. The description is minimal and lacks behavioral details.

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 concise, capturing the core purpose in a single line. However, it is not structured to highlight parameter usage or provide additional context. It is front-loaded but benefits could be improved with parameter mapping.

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?

Given the tool has three parameters, no output schema, and no annotations, the description is insufficient. It does not explain return values, how to use the carried_over_denial parameter, or any assumptions of the simple model. Context is lacking for an agent to correctly invoke the tool.

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?

Only one of three parameters has a description in the schema, and the description does not explain any parameters. The Korean text hints at book depreciation and tax limit but does not map explicitly to the schema parameters. With low schema coverage (33%), the description fails to compensate.

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 compares accounting depreciation vs tax depreciation limit and computes adjustments like denial, shortfall, and carryforward. It distinguishes from sibling tools like calc_bulk_depreciation and calc_depreciation_schedule which focus on different aspects of depreciation.

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?

The description implies usage for tax adjustment calculations but does not explicitly state when to use this tool versus alternatives like calc_bulk_depreciation or get_useful_life. No guidance on prerequisites or exclusions 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/boam79/depreciation-mcp'

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