Skip to main content
Glama

payroll.kr_medical_deduction

Read-onlyIdempotent

Calculates South Korea's medical expense tax credit by subtracting 3% of gross income, then applying general, special, premature, and infertility deduction rates with caps.

Instructions

의료비 세액공제(소득세법 제59조의4제2항)를 구한다. 총급여(원 문자열)의 3% 미달분을 일반, 특수, 미숙아, 난임 순으로 차감한 뒤 일반 의료비 15%(연 700만원 한도), 본인·6세 이하·65세 이상·장애인 등 특수 15%(한도 없음), 미숙아 20%, 난임 30%를 적용하고 원 미만 버린다. 본인·65세 이상 의료비를 일반에 넣으면 700만원 한도가 걸린다.

Input Schema

NameRequiredDescriptionDefault
yearYes
as_ofNo
prematureNo0
infertilityNo0
gross_incomeYes
general_medicalYes
special_medicalNo0
include_proposedNo

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
thresholdYes
gross_incomeYes
total_creditYes
policy_sha256Yes
policy_sourceYes
policy_statusYes
total_expenseYes
general_creditYes
policy_versionYes적용된 정책 문서의 식별 정보
special_creditYes
policy_audit_idYes
policy_citationsYes정책의 근거 조문
premature_creditYes
deductible_expenseYes
infertility_creditYes
policy_effective_toYes
policy_effective_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior5/5

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

The description discloses substantial behavior beyond the annotations: the deduction order (general, special, premature, infertility), the 3% gross-income threshold, the applicable rates (15%, 20%, 30%), the 7 million won annual cap for general medical, the no-cap rule for special medical, and the won-truncation behavior. It also warns that placing self/over-65 expenses under general triggers the cap, which is a non-obvious behavioral pitfall.

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 front-loaded with the purpose and legal basis, followed by dense but relevant calculation details. It is appropriately sized for a multi-parameter tax calculator, though the long first sentence could be broken into clearer clauses.

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

Completeness3/5

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

The calculation logic is richly described and an output schema exists, so return values need not be explained. However, the description omits the meaning of the required year parameter and the optional as_of/include_proposed flags, which are important for an agent to invoke the tool correctly.

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 0%, so the description must compensate. It explains gross_income as a won-denominated string and clarifies the four medical expense categories and how each is treated, but it does not explain the required 'year' parameter or the optional 'as_of' and 'include_proposed' parameters, leaving key inputs undocumented.

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 a specific verb and resource: computing the Korean medical expense tax credit under Income Tax Act Article 59-4 Paragraph 2. This is much more precise than the tool name alone, but it does not explicitly distinguish this tool from sibling deduction calculators like payroll.kr_donation_deduction or payroll.kr_education_deduction.

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?

The description explains the calculation mechanics but never says when to use this tool versus alternatives such as payroll.kr_year_end_tax_settlement or other kr_* deduction tools. There are no exclusion conditions or routing guidance for the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools