세무조정 참고
calc_tax_adjustmentCalculate tax adjustments by comparing book depreciation to tax limits, including prior period carryovers, for Korean corporate tax compliance.
Instructions
회계 감가상각비 vs 세무 상각범위액 → 손금부인·시인부족·추인(단순모형)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book_depreciation | Yes | ||
| tax_limit | Yes | ||
| carried_over_denial | No | 전기 이월 손금부인액 |
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)); } }, ); - src/utils/taxAdjustment.ts:6-35 (handler)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, }; } - src/types/index.ts:76-82 (schema)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; } - src/index.ts:150-154 (schema)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("전기 이월 손금부인액"), }, - src/utils/bulk.ts:79-82 (helper)Usage of calcTaxAdjustmentCore inside bulk calculation utility
const adj = calcTaxAdjustmentCore({ book_depreciation: annual_depreciation, tax_limit, });