Skip to main content
Glama

residency_check

Read-onlyIdempotent

Determine Korean tax residency, dual-residency, and treaty tie-break outcomes with a rule-based three-step check and relevant case law.

Instructions

비거주자·거주자 3단계 판정 (규칙 기반, 외부 호출 없이 동작).

언제: 판정 입력 데이터로 거주자·비거주자·이중거주자·조세조약 tie-break 결과를 즉시 확인할 때. 판단은 코드 규칙 기반 — Solar 키 없어도 동작. AI 판단 기본은 사용자 AI(호스트)가 수행 — 판정 코드는 고정. 반환: {입력, 법리, 1단계(소득세법), 2단계(이중거주자), 3단계(조세조약 tie-break), 최종 판정, 유사 판례 top3, 판단이 갈리는 지점·추가 확인 사항, 주의}. 읽기 전용, 외부 호출 없음(tax_treaty는 선택 호출, 실패 시 mock 안내 첨부).

판단 순서: (1) 소득세법 §1의2·시행령 §2(①③④)·§3·§4 → 주소/거소/파견 특례 → 거주자·비거주자·판단 보류 (2) 이중거주자 여부 (증명책임: 납세의무자, 대법원 2006두3964) (3) 조세조약 tie-break (항구적 주거 → 중대한 이해관계 중심지 → 일상적 거소 → 국적 → 상호합의)

  • 상대국이 주어지면 tax_treaty(country, keyword='거주자')로 조약 거주자 조문 번호·tie-break 원문 일부를 첨부한다. (오프라인/모의 환경에서는 treaty_country만 있으면 조약 체결국임을 전제하고 mock tie-break 원문을 첨부한다.)

  • rules.md의 유사 판례(사실관계 키워드 매칭 상위 3건, 판결요지 요약)를 첨부한다.

  • rules.md 6-4절(찾지 못함/추정) 판례는 인용하지 않는다.

  • 법리: 국내 생활관계만으로 판단(국내외 비교 아님, 대법원 92누11695)을 결과에 명시한다.

Input Schema

NameRequiredDescriptionDefault
langNoOutput language. 'en': English keys and labels, official English texts where available (tax treaties, statutes), other Korean texts returned with a host_ai_translate instruction (your AI translates); Solar machine translation only when UPSTAGE_API_KEY or on-prem Solar is configured. 기본 'ko'ko
notesNo추가 참고사항.
asset_descNo국내 자산 요약 (예: '서울 아파트 자가(부부 공동명의), 국내 증권사 주식, 성남 상가 임대').
exit_datesNo출국 날짜 목록(YYYY-MM-DD). entry_dates와 1:1 대응.
entry_datesNo입국 날짜 목록(YYYY-MM-DD). 제공 시 입국 다음날~출국일로 체류일수 자동 계산.
family_descNo국내 가족 상황 설명 (예: '배우자·자녀 2명 서울 거주, 자녀 국내 학교 재학').
nationalityNo국적 (조약 tie-break 4단계). 미입력 시 4단계 보류 → 판정 보류.미입력
dispatch_descNo파견/현지채용 상세 (예: 'S국 현지법인에 2018년 파견' 또는 '미국 현지법인에 퇴직 후 Senior Director로 신규 채용').
judgment_yearYes판정 대상 연도 (소득 지급 연도). 예: 2026
habitual_abodeNo일상적 거소.판단 보류
permanent_homeNo항구적 주거 소재. 단기체류용이 아닌 계속 사용 가능한 주거 (소유·임차 무관).없음
treaty_countryNo상대국 이름(한글). 예: '미국', '일본', '사우디아라비아'. 모르면 빈 문자열.
domestic_assetsNo국내 부동산·예금·사업용 자산 등 국내 소재 자산이 있는지 여부.
family_in_koreaNo국내에 생계를 같이하는 가족이 있는지 여부.
overseas_job_descNo해외 근무 형태 종합 설명.
domestic_stay_daysNo직전연도(판정 연도-1) 국내 체류일수. 직접 입력값. entry_dates를 제공하면 자동 계산이 우선.
job_needs_183_daysNo국내 183일 이상 거주를 통상 필요로 하는 직업인지 여부 (시행령 §2③1).
foreign_nationalityNo외국 국적이 있는지 여부.
permanent_home_descNo항구적 주거 상세 (예: '국내: 서울 아파트 자가(부부 공동), 국외: S국 아파트 임차(실사용 낮음)').
temporary_exit_daysNo관광·질병 치료 등 명백히 일시적인 출국 기간 합계(일). 시행령 §4②에 따라 국내 거소로 간주.
temporary_exit_reasonNo일시적 출국 사유 (예: '관광 5일, 치료 3일').
economic_activity_descNo경제활동 요약 (예: '국내 A건설 자문·임원 근로소득, 국내 C컨설팅 사업, 국내 B법인 배당').
local_hire_not_dispatchNo해외 현지법인에 '파견'이 아니라 퇴직 후 현지 채용된 경우 (§3 미적용, 대법원 2010두15056 구조).
foreign_nationality_descNo외국 국적·영주권 상세 (예: '미국 국적, 2015년 미국 영주권 취득').
public_official_overseasNo공무원으로서 국외 근무 중인지 여부 (시행령 §3 특례 적용 대상).
center_of_vital_interestsNo중대한 이해관계의 중심지(판례상 양국 사업규모·소득규모·체류일수 등 비교).판단 보류
domestic_business_activityNo국내 사업·경영 활동, 국내 사업자등록, 국내 근로소득 등 국내 경제활동 유무.
treaty_country_is_residentNo상대국 국내법상 거주자로 취급되는지 여부.
foreign_permanent_residencyNo외국 영주권 또는 그에 준하는 장기체류자격을 얻었는지 여부 (시행령 §2④).
dispatched_by_korean_companyNo내국법인(100% 출자 현지법인 포함) 파견 여부 (시행령 §3 특례 적용 대상).
treaty_country_resident_descNo상대국 거주자 근거 (예: '미국 영주권자로서 미국 세법 거주지 테스트 충족').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, but the description adds substantial context: rules-based with no Solar key required, host AI performs the judgment, tax_treaty is an optional external call that degrades to mock text, and it enumerates the full return payload. This tells the agent exactly how the tool behaves under failure and offline conditions — well beyond the annotations.

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?

Content is front-loaded (purpose, then when, then return shape, then the ordered steps) and each block is scannable. Minor waste: the 'no external calls' claim is restated ('외부 호출 없이 동작' at the top and '읽기 전용, 외부 호출 없음' later), and the mock-oriented parenthetical is somewhat verbose.

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

Completeness5/5

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

For a 31-parameter tool with no output schema, the description carries the missing structural burden: it enumerates the return object (input, legal basis, each of the three steps, final determination, top-3 precedents, divergence points, cautions) and spells out the legal source sequence and citation exclusions. Nothing essential for calling it correctly appears to be missing.

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?

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning by mapping parameters to the tie-break sequence (항구적 주거 → 중대한 이해관계 중심지 → 일상적 거소 → 국적 → 상호합의) and by explaining that tax_treaty(country, keyword='거주자') is invoked when a counterparty country is supplied. That interpretive layer on top of the schema's field labels is useful.

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 first line states a specific verb+resource: a rule-based 3-step resident/non-resident/dual-resident determination, and immediately scopes it as deterministic ('규칙 기반, 외부 호출 없이 동작'). It is distinguishable from judgement-heavy siblings such as residency_report because it declares the logic is fixed code, not host-AI inference.

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?

'언제:' gives an explicit trigger — when you have judgment input data and want the resident/non-resident/dual-resident/tie-break result immediately. It also clarifies the division of labor (host AI does the substantive judgment; the code is fixed). It stops short of naming an alternative sibling (e.g. residency_report) or when NOT to use it, so it is clear but not fully routable.

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