Skip to main content
Glama

Count business days

count_business_days
Read-onlyIdempotent

How many business days are in the inclusive span from start through end, matching Excel NETWORKDAYS. Negative when end is earlier. The span must be 3660 days or less. Omit calendar for us-federal-opm.

Input Schema

NameRequiredDescriptionDefault
endYesCivil date, YYYY-MM-DD. Not a timestamp.
startYesCivil date, YYYY-MM-DD. Not a timestamp.
calendarNoCalendar id. Omit for us-federal-opm. Unknown ids are an error. us-fed-banking keeps Reserve Banks open on the Friday before a Saturday holiday. us-nyse is NYSE full-day holidays for 2026 through 2028. us-sifma is SIFMA recommended U.S. full closes for 2026 and 2027. An early close stays open. us-ca is California state offices for 2026. A Saturday holiday does not close Friday. us-ny is New York State executive-branch offices for 2026 and 2027. A floating holiday stays open. us-nyc is New York City offices for 2026 and 2027. A Saturday holiday closes Friday.

Output Schema

NameRequiredDescriptionDefault
endYesend
startYesstart
sourcesYessources
calendarYescalendar
disclaimerYesdisclaimer
business_daysYesbusiness_days

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuinely new behavior: the 3660-day span cap, signed (possibly negative) output, error on unknown calendar ids, and calendar alignment quirks are all disclosed in the schema layer. That is well beyond what the annotations convey.

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?

Four short sentences, purpose front-loaded, constraints following. Terse constructions like 'Negative when end is earlier' and the redundant calendar-default line cost a little polish but nothing is padded.

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 an output schema present, the return value needn't be described; the description instead covers exactly the non-schema essentials — boundary semantics, span limit, error behavior, and calendar defaults — leaving no significant gap for correct invocation.

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% with very rich per-parameter descriptions, so the baseline is 3; the description still adds meaning the schema lacks — that start/end define an *inclusive* span (the schema never says inclusive) — though 'Omit calendar for us-federal-opm' merely repeats the schema text.

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 — counting business days in an inclusive start-through-end span — and anchors the semantics to Excel NETWORKDAYS, which unambiguously separates it from siblings like add_business_days, is_business_day, and roll_date.

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?

Gives clear usage context (inclusive span, Excel NETWORKDAYS equivalence, negative result when end precedes start) and a defaulting rule for the calendar parameter, but never names an alternative tool or states when NOT to use this one (e.g., for a single-date check use is_business_day).

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