Skip to main content
Glama

Xearno Tools

UK Statutory Residence Test Decider

uk_statutory_residence_test
Read-only

Whether you are UK tax resident this year — the full statutory test, not the 183-day myth. Runs the full UK Statutory Residence Test (FA 2013 Sch 45): automatic overseas tests, automatic UK tests, then the sufficient-ties tables. The 183-day figure everyone (and general AI) anchors on is only the ceiling — a leaver with 3 UK ties is resident at just 46 days, and at 121 days a single tie is enough. The input that decides which table applies — were you UK-resident in any of the 3 prior tax years — is the one users never volunteer, so this tool leads with it. Includes the deeming rule for non-midnight days, which AI answers routinely miss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoDays present in the UK at midnight this tax year Count days you were in the UK at the end of the day (midnight). Enter the count with exceptional-circumstances days (capped at 60) already removed, and exclude pure transit days (arrived one day, left the next, did nothing unrelated to travel).
tieWorkNoWork tie 40 or more days this year (in any pattern) on which you did more than 3 hours of work in the UK.no
tie90DayNo90-day tie You spent more than 90 days in the UK in either (or both) of the 2 previous tax years.no
tieFamilyNoFamily tie A UK-resident spouse/civil partner (or partner you live with) or minor child. A child you saw in the UK on fewer than 61 days is disregarded; a child who is UK-resident only because of full-time education here is also disregarded if they spend fewer than 21 days in the UK outside term time.no
tieCountryNoCountry tie (leavers only) The UK is the country where you spent the most midnights this year — a tie for first place that includes the UK counts as met. IGNORED for arrivers: if you answered "No" to prior-years residence above, this input has no effect on the result.no
priorResidenceNoWere you UK tax resident in any of the 3 prior tax years? The decisive input, and the one everyone omits when they ask "am I resident?". It decides WHICH ties table applies to you and whether two extra rules — the country tie and the deeming rule — exist for you at all. A leaver can be resident at 46 days; an arriver never before 46.leaver
qualifyingDaysNoDays present but NOT at midnight (optional) Days you were in the UK at some point but had left before midnight, so they are not in the count above. Only matters for leavers with 3+ ties — the deeming rule adds every such day past the first 30 to the ties-table day count. Most people can leave this at 0.
automaticUkHomeNoDo you meet the UK home test? Yes if you had a UK home you were present in on ≥30 days this year, and there was a window of 91 consecutive days (at least 30 of them falling in this tax year) during which you had no overseas home — or were present in every overseas home you had on fewer than 30 days in the year.no
automaticUkWorkNoDid you work full-time in the UK? Yes if over a 365-day period (falling at least partly in this year) more than 75% of your 3-hour-plus workdays were UK workdays, with at least one such UK workday in this tax year and no significant break from UK work.no
tieAccommodationNoAccommodation tie A place to live in the UK available to you for a continuous period of 91+ days, in which you spent at least 1 night this year. If it is the home of a close relative, it only counts if you spent 16+ nights there.no
automaticOverseasWorkNoDid you work full-time overseas this year? The statutory test in brief: averaged ≥35 hours/week of overseas work over the year (HMRC applies a precise 5-step hours calculation), no significant break (31+ days without an overseas workday), and fewer than 31 UK workdays of more than 3 hours. Answer yes only if you would clear the full test.no

TDQS

A4.3/5.0
Behavior5/5

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

The description goes beyond annotations by explaining the test's decision flow, deeming rules for non-midnight days, and the importance of priorResidence. It does not contradict the readOnlyHint (true) or openWorldHint (false) annotations. The tool's behavior is transparently documented, including edge cases and common AI errors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy and contains explanatory asides (e.g., 'the 183-day figure everyone...'). While informative, some redundancy exists (e.g., 183-day myth mentioned twice). Front-loading with purpose is good, but the verbosity could be trimmed slightly without losing clarity.

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 description thoroughly explains the test and inputs but does not specify the output format. Since no output schema is provided, the description should clarify what the tool returns (e.g., 'resident'/'non-resident' with details). This gap reduces completeness for an agent needing to parse the result.

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?

All 11 parameters have detailed schema descriptions (100% coverage). The tool description adds value by explaining how parameters interact, e.g., priorResidence determines which ties table applies and enables the country tie. This cross-parameter context enriches understanding beyond individual descriptions.

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 clearly states the tool determines UK tax residency using the full statutory test. It explicitly distinguishes from the 183-day myth and explains the test's structure (automatic tests then sufficient ties). The verb 'decides' and resource 'UK tax residence' are specific, and the explanation of inputs like priorResidence differentiates this from simpler rules.

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?

The description explains when to use this tool (full statutory test) and warns against relying on the 183-day myth. It highlights the critical input (priorResidence) and how it affects the logic. However, it does not explicitly mention sibling tools (e.g., ny_statutory_residence_checker) or provide exclusions for simple day-count queries, but the context implies this is for complex cases.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Each tool targets a distinct niche (e.g., specific country tax rules, loan types, or legal calculations), with detailed descriptions that clarify boundaries. However, the large number of tools (66) could cause some confusion for an agent trying to select the right one for a general query, especially when multiple tools relate to the same country.

Naming Consistency4/5

Tool names follow a mostly predictable pattern: lowercase words separated by underscores, often starting with a country name (e.g., 'uk_stamp_duty_sdlt') or a topic (e.g., 'compound_growth'). There are minor deviations, such as abbreviations ('npv_irr', 'sip') and varying use of verbs, but overall the naming is clear and consistent.

Tool Count3/5

At 66 tools, the server is unusually large and covers an extensive range of financial and legal calculators. While each tool justifies its existence, the count exceeds the typical well-scoped range (3–15), making the server feel bloated. A more modular design might improve coherence.

Completeness4/5

The tool set covers a wide array of domains: personal income taxes, property taxes, loan calculations, investment returns, and specific country regulations. Minor gaps exist (e.g., missing tools for corporate taxes, general retirement planning, or insurance), but the overall coverage is thorough and addresses many niche scenarios that general AI handles poorly.

Resources