Skip to main content
Glama

Compliance Evaluate State Residency

compliance_evaluate_state_residency
Read-onlyIdempotent

Evaluates an individual’s statutory residency, domicile nexus, and state tax liability across all US states and DC, with Canada federal residency and departure-tax checks.

Instructions

Evaluate individual statutory residency, domicile nexus, and state tax liability across all 50 US states and District of Columbia. jurisdiction 'CAN' or 'Canada' ('CA' is California) evaluates Canada federal residency instead (factual, deemed sojourner at 183 days, part-year emigrant or non-resident) and estimates federal Part I tax in CAD (federal_agi is taxable income, days_in_state days in Canada, tax years 2019-2026); event='emigration' adds the departure tax estimate (ITA s. 128.1).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "jurisdiction": "<jurisdiction>",
      "days_in_state": "<days_in_state>"
    },
    "name": "compliance_evaluate_state_residency"
  }
}

Input Schema

NameRequiredDescriptionDefault
ageNo
eventNoCanada (CAN) only: 'emigration' for the year an individual leaves Canada. Adds the deemed disposition on departure (ITA s. 128.1(4)(b)), the estimated departure tax and the T1161 reporting test (s. 128.1(9)).
tax_yearNo
dependentsNoNumber of dependents claimed. Applies per-dependent exemptions for KS, MS, OH, GA and UT where a sourced amount exists. Years without one raise when greater than 0.
spouse_agiNoThe spouse's part of federal_agi on a married-filing-jointly return. Used only for Mississippi combined returns, where the filing-status exemption and standard deduction are split evenly between the spouses. Ignored for other states.
federal_agiNo
is_domiciledNo
jurisdictionYes
capital_gainsNoNet capital gain. Maryland applies a 2% surtax on this amount when federal AGI exceeds $350,000 in tax years 2025-2028 (Act exclusions not modeled). Washington uses this amount for its capital gains excise tax (after the year's deduction, and from 2025 the additional tier on gains over $1,000,000). Ignored for other states.
days_in_stateYes
filing_statusNosingle
spouse_itemizesNoMarried filing separately only. True when the spouse itemizes on their separate return. Oregon's standard deduction is then zero (ORS 316.695(1)(c)(F)(i)). A state whose married-filing-separately deduction is the federal standard deduction is also zero (IRC 63(c)(6)(A)), including Utah's credit base. South Carolina tax years 2026 and later do not adopt the federal deduction and ignore this input.
retirement_incomeNo
itemized_deductionsNoUtah only. Federal itemized deductions excluding state income tax, which Utah adds back; that add-back is not computed.
emigration_propertiesNoCanada emigration only: the property owned immediately before leaving, each with category, fair_market_value and adjusted_cost_base in CAD.
has_active_driver_licenseNo
maintains_permanent_abodeNo
spouse_has_no_gross_incomeNoMarried filing separately only. True when the spouse has no gross income and is not anyone's dependent. Michigan then allows one additional personal exemption (MCL 206.30(2)(a)).
months_resident_in_last_120NoCanada emigration only: months resident in Canada in the 120 months before leaving. 60 or fewer applies the short-term resident exclusion (ITA s. 128.1(4)(b)(iv)) to property owned on arrival or inherited since.
has_active_voter_registrationNo
has_active_homestead_exemptionNo
telecommuting_days_out_of_stateNo
spouse_wa_capital_gains_deductionNoMarried filing separately, Washington only. The part of that year's standard deduction the spouse claims on their separate return. This return's deduction is the year's amount minus this input (RCW 82.87.060(1)). Must be at least 0 and at most that year's amount.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, so the bar is lower. The description still adds substantive behavior: results are estimates, Canadian output is in CAD, the supported window is tax years 2019-2026, and the departure calculation is tied to ITA s. 128.1 rather than being a plain lookup.

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?

Two sentences, front-loaded with the primary US scope before the Canada exception, and no filler. The second sentence is dense with stacked parentheticals (day counts, statute cites, currency, year range), which is efficient but strains readability.

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?

This is a complex 23-parameter tool, but an output schema exists so return values need no explanation, and the description covers the one genuinely ambiguous axis, the US-vs-Canada jurisdiction fork. The remaining gaps (individual domicile-factor inputs) are named descriptively in the schema and only affect accuracy of individual results, not the ability to invoke the tool.

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?

With only 43% schema coverage the description must carry weight, and it does for the ambiguous core: jurisdiction semantics, days_in_state meaning days in Canada, and federal_agi meaning taxable income in the Canadian branch. It leaves the domicile-factor booleans (driver license, permanent abode, voter registration, homestead, telecommuting) and US filing_status/age/tax_year unexplained in either place.

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?

States a specific verb ('evaluate') and a precise resource set: statutory residency, domicile nexus and state tax liability, scoped to all 50 states plus DC. The 'across all 50 US states' scope implicitly separates it from the state-specific siblings (Georgia, PR bona fide), and the second sentence defines the Canada branch concretely.

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?

Gives real conditional routing for the Canada path: jurisdiction 'CAN'/'Canada' selects Canadian federal residency, 'CA' is explicitly California, and event='emigration' adds the departure tax. However, there is no guidance on when to pick this tool over compliance_evaluate_georgia_residency or compliance_evaluate_pr_bona_fide_residency, and no explanation of how days_in_state drives the US determination.

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