Skip to main content
Glama

Business Days & Workday Calc

Count working days, workdays and PTO

count_business_days
Read-onlyIdempotent

Use this when the user asks how many working days, business days, workdays, office days or PTO days there are between two dates, or for a statutory holiday count, for example "how many working days between 14 July and 18 August in Germany?" or "how many working days are left in December in Ontario?". Pass the country code, the start and end dates as YYYY-MM-DD, and a region when the user names a state or province. Both dates count by default (see includeStartDate and includeEndDate). Weekends are Saturday and Sunday unless weekendDays is set. Returns the business, calendar and weekend day counts, the holidays on working days, those only some regions keep, and the conventions used. For exchange trading days pass calendars, such as ["NYSE"], ["LSE"], ["JPX"] or ["TARGET2"]. Do not use it for hours, time zones, or date differences that do not exclude weekends and holidays.

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": {
      "country": "<country>",
      "startDate": "<startDate>",
      "endDate": "<endDate>"
    },
    "name": "count_business_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
regionNoState, province or nation within the country, as a subdivision code such as DE-BY or BY (Bavaria), GB-SCT (Scotland), US-CA or AU-NSW. Optional.
countryYesTwo-letter ISO 3166-1 country code whose holidays apply, such as US, GB, DE, AU or VN.
endDateYesLast date of the range, YYYY-MM-DD. Not before startDate.
calendarsNoHoliday calendars to apply; a day is off when any of them closes it. "public" (the default) is the country's public holidays. NYSE is the New York Stock Exchange (also Nasdaq), FED the Federal Reserve and Fedwire (which DTC settlement follows), LSE the London Stock Exchange, JPX the Japan Exchange Group, TARGET2 the euro payment system. For a settlement date join the market and payment calendars, such as ["NYSE", "FED"] for a US T+1 settlement or ["TARGET2", "FED"] for EUR/USD spot. Optional.
startDateYesFirst date of the range, YYYY-MM-DD.
weekendDaysNoDays of the week that are not working days. Default: saturday and sunday. Use friday and saturday where that is the weekend.
includeEndDateNoCount endDate when it is a working day. Default true.
includeStartDateNoCount startDate when it is a working day. Default true.

Output Schema

NameRequiredDescriptionDefault
noteNo
regionNo
sourceYes
countryYes
endDateYes
weekendNo
calendarsNoThe calendars applied, when the call named calendars
startDateYes
conventionsYes
weekendDaysYes
businessDaysYes
calendarDaysYes
includesEndDateNo
includesStartDateNo
holidaysOnWorkdaysYes
regionalHolidaysNoteNo
regionalHolidaysNotCountedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / calendars
      Added value: +{
      +  "description": "Holiday calendars to apply; a day is off when any of them closes it. \"public\" (the default) is the country's public holidays. NYSE is the New York Stock Exchange (also Nasdaq), FED the Federal Reserve and Fedwire (which DTC settlement follows), LSE the London Stock Exchange, JPX the Japan Exchange Group, TARGET2 the euro payment system. For a settlement date join the market and payment calendars, such as [\"NYSE\", \"FED\"] for a US T+1 settlement or [\"TARGET2\", \"FED\"] for EUR/USD spot. Optional.",
      +  "items": {
      +    "enum": [
      +      "public",
      +      "NYSE",
      +      "FED",
      +      "LSE",
      +      "JPX",
      +      "TARGET2"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 3,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedOutput schema / properties / calendars
      Added value: +{
      +  "description": "The calendars applied, when the call named calendars",
      +  "items": {
      +    "enum": [
      +      "public",
      +      "NYSE",
      +      "FED",
      +      "LSE",
      +      "JPX",
      +      "TARGET2"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • removedOutput schema / properties / note_from_openkrill
      Removed value: -{
      -  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / note_from_openkrill
      Added value: +{
      +  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds genuinely non-obvious behavior: both endpoints count by default, weekends are Saturday/Sunday unless weekendDays is set, and the result includes calendar/weekend counts, holidays on working days, region-specific holidays and the conventions used. It does not discuss limits on range size, which is the main remaining behavioral unknown.

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 trigger condition and examples, then defaults, then return shape, then the exclusion — a logical order with no filler sentences. Slightly dense in the calendar enumeration, but each clause carries information.

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 8 parameters, an output schema present, and full annotation coverage, the description supplies everything an agent needs: when to call, required inputs, defaults for the two boolean boundary flags, weekend override semantics, and how to reach exchange-calendar behavior. Return values need not be explained given the output schema.

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 baseline would be 3, but the description adds decision-level meaning the schema does not: region is conditional on the user naming a state/province, dates are YYYY-MM-DD, and calendars is the lever for exchange trading days with named examples (NYSE, LSE, JPX, TARGET2). It also flags that includeStartDate/includeEndDate are on by default.

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 verb and resource ('how many working days, business days, workdays, office days or PTO days there are between two dates') plus the statutory-holiday variant, and gives two concrete example questions. An agent can distinguish it immediately from add_business_days or list_holidays.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the triggering user phrasings with worked examples, gives conditional guidance ('pass a region when the user names a state or province', 'for exchange trading days pass calendars'), and closes with explicit exclusions: hours, time zones, and date differences that do not exclude weekends and holidays. When-to-use and when-not-to-use are both present.

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.