Skip to main content
Glama

Count days of stay

count_days
Read-onlyIdempotent

Counts days of stay per country from the trips the user provides (country, from, to) under each country's own counting rule (calendar year, tax year, any 12 months, US substantial presence test, continuous stay): days in the counting period, the day threshold for tax residence and its legal source, the date it was reached or how many more days are needed, and Schengen 90/180 days used. The day of arrival and departure counts in both countries. It does not track anyone: it only counts the trips passed in, and they are not stored.

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": {
      "trips": "<trips>"
    },
    "name": "count_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoDate to count up to, YYYY-MM-DD. Default: today. Later trips count as planned.
tripsYesStays, one item per stay.
versionNoLanguage of the texts (version id). Default: en.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / version / enum
      Previous value: -[
      -  "uk",
      -  "en",
      -  "pl",
      -  "cs",
      -  "ro",
      -  "hu",
      -  "tr",
      -  "zh",
      -  "in",
      -  "ja",
      -  "bn",
      -  "pk",
      -  "de",
      -  "at",
      -  "fr",
      -  "es",
      -  "pt",
      -  "it"
      -]New value: +[
      +  "uk",
      +  "en",
      +  "pl",
      +  "cs",
      +  "ro",
      +  "hu",
      +  "tr",
      +  "zh",
      +  "in",
      +  "ja",
      +  "bn",
      +  "pk",
      +  "de",
      +  "at",
      +  "fr",
      +  "es",
      +  "pt",
      +  "it",
      +  "my",
      +  "sg",
      +  "tw",
      +  "se",
      +  "br",
      +  "ar"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / version / enum
      Previous value: -[
      -  "uk",
      -  "en",
      -  "pl",
      -  "cs",
      -  "ro",
      -  "hu",
      -  "tr",
      -  "zh",
      -  "in",
      -  "ja",
      -  "bn",
      -  "pk"
      -]New value: +[
      +  "uk",
      +  "en",
      +  "pl",
      +  "cs",
      +  "ro",
      +  "hu",
      +  "tr",
      +  "zh",
      +  "in",
      +  "ja",
      +  "bn",
      +  "pk",
      +  "de",
      +  "at",
      +  "fr",
      +  "es",
      +  "pt",
      +  "it"
      +]
  3. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, closed-world and non-destructive, yet the description adds genuinely new behavior: counting is done under each country's own rule (calendar year, tax year, any 12 months, substantial presence, continuous stay), arrival and departure days count in both countries, and trips are not stored. Those are the exact details an agent cannot get from 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?

Front-loaded with the action and organized as purpose, counting rule, output list, edge-case convention, and statelessness caveat. It is a dense single paragraph, and the long output enumeration could be trimmed, but nearly every clause carries information an agent needs.

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?

With no output schema, the description takes on the burden of describing returns and does so concretely: days in the period, threshold and legal source, date reached or days remaining, and Schengen 90/180 usage. Combined with the arrival/departure counting convention and the no-storage note, nothing essential for correct invocation is missing.

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 100%, so the schema already documents country/from/to and as_of. The description restates the trip tuple and adds rule semantics that are not parameter-specific, but it adds nothing about as_of behavior or version selection beyond what the schema says. Baseline 3 applies when the schema does the heavy lifting.

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 and resource ("Counts days of stay per country") and scopes the input explicitly ("from the trips the user provides (country, from, to)"). It also enumerates the outputs, so an agent can distinguish this counting tool from residency-determination siblings like check_residency or explain_residency without opening a schema.

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 description implies the usage context (stateless counting of supplied trips, no tracking) but never states when to prefer this over check_residency or explain_residency, nor any exclusion conditions. The agent must infer the routing from sibling names rather than from explicit guidance in the text.

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