Skip to main content
Glama

Find a date N days before or after

calculate_date_offset
Read-onlyIdempotent

Use this when the user wants the date that is N days or N business days (working days) before or after a date: 'what date is 90 days from today', '30 business days from Nov 3, 2026 in Germany', '10 working days before 2027-01-15', shipping or contract deadlines. Business days skip weekends and the public holidays of the given country and state, including observed weekdays for holidays that fall on a weekend (US July 4, 2027 is a Sunday, so Monday July 5 is skipped); the start date is not counted. For calendar days, roll=next_business_day moves a result that lands on a weekend or holiday to the next business day. Returns the date with its weekday, the holidays skipped, and a calendar (.ics) file. Results are informational: court and filing deadlines may have special rules (court holidays, service days). Does not handle times of day.

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>",
      "days": "<days>"
    },
    "name": "calculate_date_offset"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysYesNumber of days to add, e.g. 30; use a negative number such as -10 to go back.
rollNoFor calendar days only: if the result is a weekend or holiday, move it, e.g. next_business_day for filing deadlines. Default none.
unitNo"calendar" counts every day (default); "business" skips weekends and holidays, e.g. business for '10 working days'.
startYesStarting date, e.g. 2026-10-02, "Nov 3, 2026" or "today".
countryNoCountry for public holidays as an ISO 3166 two-letter code, e.g. US, GB, DE, PL, AU, CA, IN. Omit to skip holidays (weekends only).
subdivisionNoOptional state/province/region code within the country for local holidays, e.g. TX or CA (US states), BY (Bavaria, DE), ENG or SCT (UK), NSW (AU), ON (CA).
weekend_daysNoNon-working weekdays, e.g. ["friday","saturday"]. Default saturday+sunday (friday+saturday for countries such as SA, IL, EG, QA, KW).
extra_holidaysNoExtra non-working dates to skip, e.g. company shutdown days ["2026-12-24","2026-12-31"].
include_bank_holidaysNoAlso skip bank-only closing days where the data has them (e.g. Dec 24 and Dec 31 in Germany). Default false.

Output Schema

NameRequiredDescriptionDefault
daysYes
kindYes
rollYes
unitYes
notesYes
startYes
inputsYes
regionYes
resultYes
summaryYes
calendarYes
downloadsYes
rolled_fromYes
weekend_daysYes
holiday_sourceYes
holidays_skippedYes
holidays_in_rangeYes
weekend_days_skippedYes
calendar_days_spannedYes
result_is_business_dayYes

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, yet the description still adds real behavior: business days skip weekends plus country/state public holidays, observed-weekday handling with a worked US July 4, 2027 example, the start date not being counted, roll semantics for calendar days, and the returned artifacts (weekday, skipped holidays, .ics). It also flags the result as informational for court deadlines.

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 triggering condition and example queries, and every clause carries operational meaning. The single dense paragraph with nested parentheticals and a long worked example is slightly heavy, but nothing is filler.

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 9-parameter, holiday-aware date computation tool, the description covers counting rules, holiday resolution, roll behavior, output contents, and a caveat about legal deadlines. An output schema exists, yet the return summary is still useful and nothing critical is missing.

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 the baseline is 3; the description still contributes semantics the schema lacks, notably that the start date is not counted, how roll interacts with calendar vs business units, and the observed-holiday weekday rule. It doesn't explain weekend_days/extra_holidays/include_bank_holidays beyond what the schema already says.

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+resource (compute the date N days before/after a start date) and backs it with three concrete query examples, including a localized business-day variant. An agent can distinguish it from count_days_between and list_holidays purely from the text.

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 this when the user wants the date that is N days or N business days..." plus example phrasings and deadline use cases give clear positive routing. It also excludes one scope ("Does not handle times of day"), but never names the sibling tools or states when to prefer count_days_between/list_holidays instead.

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