Skip to main content
Glama

Count days between dates

count_days
Read-onlyIdempotent

Use for any 'how many days between two dates' question: plain date difference, age or duration, or business days. By default, counts all calendar days, including the earlier date and excluding the later date. For business days, set excludeWeekdays, for example [0,6] for Saturday and Sunday. To also skip public holidays, set excludeHolidays and country, and region for a regional calendar. To check if one date is a working day, use the same date as start and end with includeEnd true: days is 1 or 0. Plain reversed dates give a negative count; filtered counts are never negative. If holiday data is unavailable, the call fails. Returns the count, weekday and ISO week of both dates, elapsed years, months and days for plain counts, warnings to read, the rules used and a share link.

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

Input Schema

NameRequiredDescriptionDefault
endYesSecond date of the range. The later of start and end is counted only when includeEnd is true. An end before start makes a count with no exclusions negative.
startYesFirst date of the range, as year, month and day, for example 2027-01-15. The earlier of start and end is always counted.
regionNoRegion of country, to also exclude its regional public holidays: the exact code that list_locations gives for the country. Omit it to use only the national calendar.
countryNoCountry whose public holidays excludeHolidays removes, as its code from list_locations, for example US or DE. Necessary when excludeHolidays is true or region is set.
languageNoLanguage of the Date Calculator page that shareUrl opens. The call fails when that page does not offer the country. nb and no, zh-Hans and zh-cn, and zh-Hant and zh-tw are the same language. Weekday names and warnings in the result are always English.en
includeEndNoSet true to count the later date too, so that both dates are in the count.
excludeHolidaysNoExclude public holidays, including observed dates, as full days. The data does not mark half-day holidays. Requires country; unavailable holiday data is an error.
excludeWeekdaysNoWeekdays that do not count, as numbers: 0 is Sunday, 1 is Monday, and so on to 6 for Saturday. Use [0,6] for a Saturday and Sunday weekend; some countries have a different weekend, so choose the days for the country.

Output Schema

NameRequiredDescriptionDefault
okYesAlways true. An error result has no structured content.
daysYesThe answer: the days in the range that are not excluded. Negative only when end is before start and nothing is excluded.
rulesYesThe inputs as the calculation applied them, with defaults filled in, and the rules it followed in words. country is the country that was sent, or null.
weeksNoThe same span in weeks, to 2 decimals. Only with no exclusion.
yearsNoThe same span in years, to 2 decimals. Only with no exclusion.
monthsNoThe same span in months, to 2 decimals. Only with no exclusion.
elapsedNoThe span between the two dates as whole years, months and days, for an age or a duration. Never negative. Only with no exclusion.
endDateYesThe end input with its weekday and ISO week.
filteredYesTrue when a weekday or holiday exclusion applied to the count.
shareUrlYesLink that opens this calculation in the Date Calculator on onlinealarmkur.com.
warningsYesEnglish notes that change how to read the result; tell the user about them. Empty when there are none.
startDateYesThe start input with its weekday and ISO week.
holidayDataYesSource, version and coverage of the holiday data that the calculation used. Null when it used no holiday data.
calendarDaysYesAll calendar days in the range, before exclusions. Equal to days with no exclusion.
excludedDaysYesDays in the range that the weekday and holiday exclusions removed. 0 with no exclusion.
excludedHolidayDatesYesPublic holidays in the range that were excluded and that are not on an excluded weekday.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"Canonical uppercase ISO country code; discover supported codes with list_locations."New value: +"Country whose public holidays excludeHolidays removes, as its code from list_locations, for example US or DE. Necessary when excludeHolidays is true or region is set."
    • changedInput schema / properties / end / description
      Previous value: -"Calendar date, YYYY-MM-DD. Order does not matter for the count, but a plain reversed count is negative."New value: +"Second date of the range. The later of start and end is counted only when includeEnd is true. An end before start makes a count with no exclusions negative."
    • changedInput schema / properties / excludeWeekdays / description
      Previous value: -"Weekdays to exclude: 0 Sunday through 6 Saturday. Default none. Use [0,6] for a Saturday and Sunday weekend; some countries have a different weekend, so choose the days for the country."New value: +"Weekdays that do not count, as numbers: 0 is Sunday, 1 is Monday, and so on to 6 for Saturday. Use [0,6] for a Saturday and Sunday weekend; some countries have a different weekend, so choose the days for the country."
    • changedInput schema / properties / includeEnd / description
      Previous value: -"Set true to count both dates (inclusive). Default false."New value: +"Set true to count the later date too, so that both dates are in the count."
    • changedInput schema / properties / language / description
      Previous value: -"Website language, default en. All 32 site languages; nb/no and zh-Hans/zh-cn, zh-Hant/zh-tw aliases are accepted. Holiday names may fall back to their native language. Weekday names in results are always English."New value: +"Language of the Date Calculator page that shareUrl opens. The call fails when that page does not offer the country. nb and no, zh-Hans and zh-cn, and zh-Hant and zh-tw are the same language. Weekday names and warnings in the result are always English."
    • changedInput schema / properties / region / description
      Previous value: -"Exact subdivision code from list_locations; omit for the national calendar."New value: +"Region of country, to also exclude its regional public holidays: the exact code that list_locations gives for the country. Omit it to use only the national calendar."
    • changedInput schema / properties / start / description
      Previous value: -"Calendar date, YYYY-MM-DD. Order does not matter for the count, but a plain reversed count is negative."New value: +"First date of the range, as year, month and day, for example 2027-01-15. The earlier of start and end is always counted."
    • changedOutput schema / properties / holidayData / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "category": {
      -        "const": "public",
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "Canonical uppercase ISO country code; discover supported codes with list_locations.",
      -        "pattern": "^[A-Z]{2}$",
      -        "type": "string"
      -      },
      -      "coverage": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "endYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "startYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "startYear",
      -          "endYear"
      -        ],
      -        "type": "object"
      -      },
      -      "dataVersion": {
      -        "type": "string"
      -      },
      -      "fetchedRange": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "endYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "startYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "startYear",
      -          "endYear"
      -        ],
      -        "type": "object"
      -      },
      -      "generatedAt": {
      -        "type": "string"
      -      },
      -      "languageFallback": {
      -        "type": "boolean"
      -      },
      -      "languageRequested": {
      -        "type": "string"
      -      },
      -      "languageUsed": {
      -        "type": "string"
      -      },
      -      "observed": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "region": {
      -        "anyOf": [
      -          {
      -            "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      -            "maxLength": 64,
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "source": {
      -        "const": "https://api.onlinealarmkur.com",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "source",
      -      "dataVersion",
      -      "generatedAt",
      -      "country",
      -      "region",
      -      "coverage",
      -      "fetchedRange",
      -      "languageRequested",
      -      "languageUsed",
      -      "languageFallback",
      -      "category",
      -      "observed"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "category": {
      +        "const": "public",
      +        "description": "Always public: the data holds public holidays only.",
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "Country of the holiday calendar that the calculation used.",
      +        "pattern": "^[A-Z]{2}$",
      +        "type": "string"
      +      },
      +      "coverage": {
      +        "additionalProperties": false,
      +        "description": "First and last year that the calendar has data for.",
      +        "properties": {
      +          "endYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "startYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "startYear",
      +          "endYear"
      +        ],
      +        "type": "object"
      +      },
      +      "dataVersion": {
      +        "description": "Version of the holiday dataset: a hash of its content, so it changes only when the data changes.",
      +        "type": "string"
      +      },
      +      "fetchedRange": {
      +        "additionalProperties": false,
      +        "description": "First and last year of the holiday data that the calculation loaded.",
      +        "properties": {
      +          "endYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "startYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "startYear",
      +          "endYear"
      +        ],
      +        "type": "object"
      +      },
      +      "generatedAt": {
      +        "description": "Build time of the holiday data, as the dataset gives it.",
      +        "type": "string"
      +      },
      +      "languageFallback": {
      +        "description": "True when the calendar does not have the requested language. The names are then in the calendar's default language.",
      +        "type": "boolean"
      +      },
      +      "languageRequested": {
      +        "description": "Language requested for the holiday names, in the code form of the holiday data: no, zh-cn and zh-tw show as nb, zh-Hans and zh-Hant.",
      +        "type": "string"
      +      },
      +      "languageUsed": {
      +        "description": "Language of the holiday names that the data gave.",
      +        "type": "string"
      +      },
      +      "observed": {
      +        "const": true,
      +        "description": "Always true: observed dates are included.",
      +        "type": "boolean"
      +      },
      +      "region": {
      +        "anyOf": [
      +          {
      +            "maxLength": 64,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Region of that calendar. Null for the national calendar."
      +      },
      +      "source": {
      +        "const": "https://api.onlinealarmkur.com",
      +        "description": "Origin of the holiday data.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "source",
      +      "dataVersion",
      +      "generatedAt",
      +      "country",
      +      "region",
      +      "coverage",
      +      "fetchedRange",
      +      "languageRequested",
      +      "languageUsed",
      +      "languageFallback",
      +      "category",
      +      "observed"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / rules / properties / adjustmentRule / description
      Added value: +"In words: how the units and the exclusions were applied. Only for add and subtract."
    • addedOutput schema / properties / rules / properties / boundaryRule / description
      Added value: +"In words: which of the first and the last day the calculation counted."
    • changedOutput schema / properties / rules / properties / country / anyOf
      Previous value: -[
      -  {
      -    "description": "Canonical uppercase ISO country code; discover supported codes with list_locations.",
      -    "pattern": "^[A-Z]{2}$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^[A-Z]{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / rules / properties / language / description
      Added value: +"Language of the page that shareUrl opens, with nb, zh-Hans and zh-Hant shown as no, zh-cn and zh-tw."
    • changedOutput schema / properties / rules / properties / region / anyOf
      Previous value: -[
      -  {
      -    "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      -    "maxLength": 64,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 64,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed20 schema fields changed
    • addedOutput schema / properties / calendarDays / description
      Added value: +"All calendar days in the range, before exclusions. Equal to days with no exclusion."
    • addedOutput schema / properties / days / description
      Added value: +"The answer: the days in the range that are not excluded. Negative only when end is before start and nothing is excluded."
    • addedOutput schema / properties / elapsed / description
      Added value: +"The span between the two dates as whole years, months and days, for an age or a duration. Never negative. Only with no exclusion."
    • addedOutput schema / properties / endDate / description
      Added value: +"The end input with its weekday and ISO week."
    • addedOutput schema / properties / endDate / properties / isoWeek / description
      Added value: +"ISO 8601 week of date."
    • addedOutput schema / properties / endDate / properties / weekday / description
      Added value: +"English weekday name of date."
    • addedOutput schema / properties / excludedDays / description
      Added value: +"Days in the range that the weekday and holiday exclusions removed. 0 with no exclusion."
    • addedOutput schema / properties / excludedHolidayDates / description
      Added value: +"Public holidays in the range that were excluded and that are not on an excluded weekday."
    • addedOutput schema / properties / filtered / description
      Added value: +"True when a weekday or holiday exclusion applied to the count."
    • addedOutput schema / properties / holidayData / description
      Added value: +"Source, version and coverage of the holiday data that the calculation used. Null when it used no holiday data."
    • addedOutput schema / properties / months / description
      Added value: +"The same span in months, to 2 decimals. Only with no exclusion."
    • addedOutput schema / properties / ok / description
      Added value: +"Always true. An error result has no structured content."
    • addedOutput schema / properties / rules / description
      Added value: +"The inputs as the calculation applied them, with defaults filled in, and the rules it followed in words. country is the country that was sent, or null."
    • addedOutput schema / properties / shareUrl / description
      Added value: +"Link that opens this calculation in the Date Calculator on onlinealarmkur.com."
    • addedOutput schema / properties / startDate / description
      Added value: +"The start input with its weekday and ISO week."
    • addedOutput schema / properties / startDate / properties / isoWeek / description
      Added value: +"ISO 8601 week of date."
    • addedOutput schema / properties / startDate / properties / weekday / description
      Added value: +"English weekday name of date."
    • addedOutput schema / properties / warnings / description
      Added value: +"English notes that change how to read the result; tell the user about them. Empty when there are none."
    • addedOutput schema / properties / weeks / description
      Added value: +"The same span in weeks, to 2 decimals. Only with no exclusion."
    • addedOutput schema / properties / years / description
      Added value: +"The same span in years, to 2 decimals. Only with no exclusion."
  3. Changed3 schema fields changed
    • removedInput schema / properties / region / pattern
      Removed value: -"^[\\p{L}\\p{N}][\\p{L}\\p{N} _.'-]{0,63}$"
    • changedOutput schema / properties / holidayData / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "category": {
      -        "const": "public",
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "Canonical uppercase ISO country code; discover supported codes with list_locations.",
      -        "pattern": "^[A-Z]{2}$",
      -        "type": "string"
      -      },
      -      "coverage": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "endYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "startYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "startYear",
      -          "endYear"
      -        ],
      -        "type": "object"
      -      },
      -      "dataVersion": {
      -        "type": "string"
      -      },
      -      "fetchedRange": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "endYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "startYear": {
      -            "maximum": 9999,
      -            "minimum": 1,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "startYear",
      -          "endYear"
      -        ],
      -        "type": "object"
      -      },
      -      "generatedAt": {
      -        "type": "string"
      -      },
      -      "languageFallback": {
      -        "type": "boolean"
      -      },
      -      "languageRequested": {
      -        "type": "string"
      -      },
      -      "languageUsed": {
      -        "type": "string"
      -      },
      -      "observed": {
      -        "const": true,
      -        "type": "boolean"
      -      },
      -      "region": {
      -        "anyOf": [
      -          {
      -            "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      -            "maxLength": 64,
      -            "pattern": "^[\\p{L}\\p{N}][\\p{L}\\p{N} _.'-]{0,63}$",
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "source": {
      -        "const": "https://api.onlinealarmkur.com",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "source",
      -      "dataVersion",
      -      "generatedAt",
      -      "country",
      -      "region",
      -      "coverage",
      -      "fetchedRange",
      -      "languageRequested",
      -      "languageUsed",
      -      "languageFallback",
      -      "category",
      -      "observed"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "category": {
      +        "const": "public",
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "Canonical uppercase ISO country code; discover supported codes with list_locations.",
      +        "pattern": "^[A-Z]{2}$",
      +        "type": "string"
      +      },
      +      "coverage": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "endYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "startYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "startYear",
      +          "endYear"
      +        ],
      +        "type": "object"
      +      },
      +      "dataVersion": {
      +        "type": "string"
      +      },
      +      "fetchedRange": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "endYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "startYear": {
      +            "maximum": 9999,
      +            "minimum": 1,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "startYear",
      +          "endYear"
      +        ],
      +        "type": "object"
      +      },
      +      "generatedAt": {
      +        "type": "string"
      +      },
      +      "languageFallback": {
      +        "type": "boolean"
      +      },
      +      "languageRequested": {
      +        "type": "string"
      +      },
      +      "languageUsed": {
      +        "type": "string"
      +      },
      +      "observed": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "region": {
      +        "anyOf": [
      +          {
      +            "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      +            "maxLength": 64,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "source": {
      +        "const": "https://api.onlinealarmkur.com",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "source",
      +      "dataVersion",
      +      "generatedAt",
      +      "country",
      +      "region",
      +      "coverage",
      +      "fetchedRange",
      +      "languageRequested",
      +      "languageUsed",
      +      "languageFallback",
      +      "category",
      +      "observed"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / rules / properties / region / anyOf
      Previous value: -[
      -  {
      -    "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      -    "maxLength": 64,
      -    "pattern": "^[\\p{L}\\p{N}][\\p{L}\\p{N} _.'-]{0,63}$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Exact subdivision code from list_locations; omit for the national calendar.",
      +    "maxLength": 64,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed16 schema fields changed
    • addedInput schema / properties / end / description
      Added value: +"Calendar date, YYYY-MM-DD. Order does not matter for the count, but a plain reversed count is negative."
    • changedInput schema / properties / excludeHolidays / description
      Previous value: -"Exclude public holidays, including observed dates. Requires country; unavailable holiday data is an error."New value: +"Exclude public holidays, including observed dates, as full days. The data does not mark half-day holidays. Requires country; unavailable holiday data is an error."
    • changedInput schema / properties / excludeWeekdays / description
      Previous value: -"Weekdays to exclude: 0 Sunday through 6 Saturday. Default none; use [0,6] for Saturday/Sunday weekends."New value: +"Weekdays to exclude: 0 Sunday through 6 Saturday. Default none. Use [0,6] for a Saturday and Sunday weekend; some countries have a different weekend, so choose the days for the country."
    • changedInput schema / properties / includeEnd / description
      Previous value: -"Include the later endpoint, even for reversed inputs. Default false."New value: +"Set true to count both dates (inclusive). Default false."
    • changedInput schema / properties / language / description
      Previous value: -"Website language, default en. All 32 site languages; nb/no and zh-Hans/zh-cn, zh-Hant/zh-tw aliases are accepted. Holiday names may fall back to their native language."New value: +"Website language, default en. All 32 site languages; nb/no and zh-Hans/zh-cn, zh-Hant/zh-tw aliases are accepted. Holiday names may fall back to their native language. Weekday names in results are always English."
    • addedInput schema / properties / start / description
      Added value: +"Calendar date, YYYY-MM-DD. Order does not matter for the count, but a plain reversed count is negative."
    • addedOutput schema / properties / elapsed
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "days": {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "months": {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "years": {
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "years",
      +    "months",
      +    "days"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / endDate
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "date": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +      "type": "string"
      +    },
      +    "isoWeek": {
      +      "pattern": "^\\d{4}-W\\d{2}$",
      +      "type": "string"
      +    },
      +    "weekday": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "date",
      +    "weekday",
      +    "isoWeek"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / rules / properties / country / anyOf
      Added value: +[
      +  {
      +    "description": "Canonical uppercase ISO country code; discover supported codes with list_locations.",
      +    "pattern": "^[A-Z]{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / rules / properties / country / description
      Removed value: -"Canonical uppercase ISO country code; discover supported codes with list_locations."
    • removedOutput schema / properties / rules / properties / country / pattern
      Removed value: -"^[A-Z]{2}$"
    • removedOutput schema / properties / rules / properties / country / type
      Removed value: -"string"
    • addedOutput schema / properties / rules / properties / roll
      Added value: +{
      +  "enum": [
      +    "none",
      +    "next",
      +    "previous"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / startDate
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "date": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +      "type": "string"
      +    },
      +    "isoWeek": {
      +      "pattern": "^\\d{4}-W\\d{2}$",
      +      "type": "string"
      +    },
      +    "weekday": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "date",
      +    "weekday",
      +    "isoWeek"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "ok",
      -  "days",
      -  "excludedDays",
      -  "calendarDays",
      -  "weeks",
      -  "months",
      -  "years",
      -  "filtered",
      -  "excludedHolidayDates",
      -  "rules",
      -  "holidayData",
      -  "shareUrl"
      -]New value: +[
      +  "ok",
      +  "days",
      +  "excludedDays",
      +  "calendarDays",
      +  "filtered",
      +  "excludedHolidayDates",
      +  "startDate",
      +  "endDate",
      +  "warnings",
      +  "rules",
      +  "holidayData",
      +  "shareUrl"
      +]
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the default counting convention (earlier date included, later excluded), the negative-count rule for reversed plain ranges versus clamped filtered counts, and that the call fails outright when holiday data is unavailable. It also warns that half-day holidays are not modeled and that warnings in the result should be read, which is real operational context.

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 use case is front-loaded and each sentence carries actionable information. The closing sentence enumerating return fields is somewhat redundant given a dedicated output schema, though calling out warnings to read keeps it partially earned.

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 an 8-parameter tool with a full output schema, everything an agent needs to call it correctly is present: defaults, dependency rules (excludeHolidays requires country), failure modes, and the negative-count edge case. No material gap remains.

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 already 100%, so the baseline is 3; the description exceeds it by explaining the working-day idiom (same date for start and end with includeEnd true) and the country/region pairing sourced from list_locations. The excludeWeekdays example largely restates the schema's own example, which keeps it from a 5.

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 opening sentence states a specific verb and resource tied to the user's question ('how many days between two dates'), then enumerates the flavors (plain difference, age/duration, business days). It is unmistakable against siblings like shift_date or get_holidays, and it even points to list_locations as the source of country codes.

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 conditions for the optional behaviors: set excludeWeekdays for business days, add excludeHolidays plus country/region for holiday-aware counts, and use identical start/end with includeEnd true to test whether a date is a working day. It stops short of explicitly naming a sibling tool and saying when not to use this one, so it falls just under full routing guidance.

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.