Skip to main content
Glama

check us residency

check_us_residency
Read-onlyIdempotent

US substantial presence test: resident if at least 31 days this year and at least 183 weighted days (all days this year + 1/3 of last year + 1/6 of the year before), after removing exempt-individual days. Closer connection exception and treaties are not checked. US (IRS), as of 2026-11-22. General information only: not tax advice; tax treaties can override the result. Verdict is resident, nonresident or depends.

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": {
      "current": "<current>"
    },
    "name": "check_us_residency"
  }
}

Input Schema

NameRequiredDescriptionDefault
prior1NoDays in the US last year
prior2NoDays in the US the year before
currentYesDays in the US this year
exemptDaysNoDays this year as an exempt individual etc. (not counted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds substantive behavior beyond that: exempt-individual days are removed before weighting, the prior years are weighted at 1/3 and 1/6, and the verdict set is fixed at resident/nonresident/depends, along with an as-of date (2026-11-22) and an explicit not-tax-advice disclaimer.

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 definition is dense but front-loaded, leading with the test name and threshold rule before caveats and the disclaimer. Every sentence carries information an agent needs (formula, exclusions, verdicts, jurisdiction, date), though the single-paragraph packing of test rule, limitations, and disclaimer is slightly harder to scan than separated clauses would be.

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 read-only calculator with four fully documented parameters and no output schema, the description supplies everything missing: the computation rule, how exempt days are treated, the exact verdict vocabulary an agent can expect back, the jurisdiction and effective date, and the known limitations (closer connection, treaties).

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 coverage is 100%, so the baseline would be 3. The description exceeds it by explaining how the three day-count parameters combine (all current days plus one-third of last year plus one-sixth of the year before) and that exemptDays are excluded from the tally, which is real semantic value not present in the schema's terse 'Days in the US last year' labels.

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 names a specific test (US substantial presence test) and states exactly what it computes: resident status from day counts with the 31-day and 183-weighted-day thresholds. It also names the three possible outputs (resident, nonresident, depends), which lets an agent distinguish it from the sibling jurisdiction checks such as check_es_residency or check_uk_residency without opening any schema.

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?

It gives clear scope boundaries: the closer connection exception and treaties are not checked, and the result can be overridden by tax treaties. It also frames the tool as general information rather than tax advice, which tells an agent when to hedge. There is no explicit statement of when not to call it, but the exclusions effectively serve that role.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.