Skip to main content
Glama

count_business_days

Read-onlyIdempotent

Counts business days between two dates, excluding weekends and country-specific public holidays, to measure working-time spans accurately.

Instructions

Counts the number of business (working) days between two dates, excluding weekends and country-specific public holidays. The count is exclusive of the start date and inclusive of the end date. Returns the integer day count. Use when measuring working-time span between two dates.

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_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "count_business_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
countryNoISO-3166-1-alpha-2 country code for holiday calendar. Supported holiday sets: US, UK, FR, DE, JP; other valid 2-letter codes fall back to weekend-only counting and say so in holidaySupport.US
end_dateYesISO date string for the end date.
start_dateYesISO date string for the start date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / country / description
      Previous value: -"ISO-3166-1-alpha-2 country code for holiday calendar."New value: +"ISO-3166-1-alpha-2 country code for holiday calendar. Supported holiday sets: US, UK, FR, DE, JP; other valid 2-letter codes fall back to weekend-only counting and say so in holidaySupport."
    • addedInput schema / properties / country / pattern
      Added value: +"^[A-Za-z]{2}$"
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description does add genuinely new behavioral detail: the count is exclusive of the start date and inclusive of the end date, and it returns an integer, which prevents off-by-one mistakes. It omits the holiday-calendar fallback behavior that lives in the schema.

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?

Three short, front-loaded sentences with no filler: definition, boundary rule, return type, then usage. Slightly compressible but every sentence 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?

For a three-parameter read-only computation with no output schema, the definition covers what it computes, the boundary convention, the return type, and when to reach for it. The remaining nuance (country fallback) is fully handled in the schema, so nothing an agent needs 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 description coverage is 100%, including the country code pattern, supported holiday sets (US, UK, FR, DE, JP) and the weekend-only fallback. The description only echoes "country-specific public holidays" and adds no syntax or format meaning beyond the schema, so baseline 3 applies.

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 the number of business (working) days between two dates") plus the exclusion rule (weekends and country-specific public holidays). This clearly separates it from a sibling like add_business_days, which shifts a date rather than measuring a span.

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?

"Use when measuring working-time span between two dates" gives an explicit use condition. It stops short of naming alternatives or exclusions (e.g., when to use time_math or a simple date diff instead), so it is clear context without routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.