Skip to main content
Glama

Check tax-residency day counts

check_residency
Read-onlyIdempotent

Count distinct days of presence per country per calendar year and evaluate the generic 183-day rule, the US Substantial Presence Test (weighted 3-year formula), and the UK 183-day tax-year test. Early-warning day counter — not tax advice.

Input Schema

NameRequiredDescriptionDefault
staysYes
referenceDateNoOptional 'as of' date. Defaults to today (UTC).

Output Schema

NameRequiredDescriptionDefault
okNo
countriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "stays": [
      +      {
      +        "country": "PT",
      +        "entry": "2026-01-10",
      +        "exit": "2026-04-02"
      +      }
      +    ]
      +  }
      +]
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so credit here goes to what the description adds: the exact rule sets applied (generic 183-day, US SPT weighted 3-year formula, UK tax-year test) and an explicit disclaimer that results are not tax advice. That is meaningful behavioral context 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.

Conciseness5/5

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

Two sentences, front-loaded with the computation and its scope, then the rule sets, then the disclaimer. No filler and nothing buried.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the description names all three evaluated tests. What remains uncovered is the counting convention for ambiguous date ranges and the overlap/duplicate-day behavior, which matters for correctness of the input.

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 coverage is 50%: referenceDate and country are documented in the schema, while entry/exit carry only date formats. The description's 'per country per calendar year' hints at grouping but does not clarify day-counting conventions such as whether entry and exit days are inclusive or how overlapping/duplicate stays are handled — a real gap for a day-count tool.

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?

States a specific verb and resource ('count distinct days of presence per country per calendar year') and enumerates the three rule sets evaluated, so the computation is unambiguous. It does not differentiate itself from overlapping siblings such as check_tax_residency_risk or check_travel_residency, which an agent would need to disambiguate at selection time.

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?

The clause 'Early-warning day counter — not tax advice' implies a screening use case and sets a scope boundary, but there is no explicit when-to-use/when-not guidance and no routing to the closely related residency siblings. Usage is inferable but not stated.

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.

Resources