MCP Time Server

เครื่องมือคำนวณเวลาความแม่นยำสูง รองรับการแยกวิเคราะห์ ISO 8601 การแปลงเขตเวลา วันทำการ การคำนวณระยะเวลา การจัดรูปแบบเวลาสัมพัทธ์ และการสร้างปฏิทินแบบครบถ้วน

เอกสาร

BrainyCalc Docs — MCP Date & Time Tools

Getting Started

Overview Quick Start

Core & Formatting

now format_date parse_date adjust_time boundary_of get_date_format format_standard parse_strict to_representation utc_date

Difference & Compare

date_diff calc_age compare_dates is_between date_compare relative_time intl_format_distance closest_date interval_overlap

Business & Calendar

business_days work_days calendar_month each_weekend_of day_of_week last_day_of countdown

Timezones & World

convert_timezone local_time world_time time_duration

Intervals & Durations

each_of_interval duration interval_to_duration format_duration_string parse_iso_duration clamp_date round_to_nearest

Components & Setters

date_part date_components_all set_components days_in_month convert_units time_add

Validation & Predicates

is_valid date_predicate date_predicates unix_convert min_max locale_data next_prev_weekday

Other Modules

Mathematics Conversions

Docs/ MCP Date & Time Tools

API Reference · 50 Tools

MCP Date & Time Tools

High-precision temporal calculation engine supporting ISO 8601 parsing, timezone conversions, business days, duration math, relative time formatting, and full calendar generation.

MCP Time Server · v1.0.7

All 50 date & time calculation tools are available as a standalone Model Context Protocol (MCP) server. Install via npx -y @brainycalc/mcptimeserver to empower AI assistants (LM Studio, Claude Desktop) with deterministic temporal operations.

Copy MCP config Copy local MCP config

now format_date parse_date adjust_time boundary_of get_date_format format_standard parse_strict to_representation utc_date date_diff calc_age compare_dates is_between date_compare relative_time intl_format_distance closest_date interval_overlap business_days work_days calendar_month each_weekend_of day_of_week last_day_of countdown convert_timezone local_time world_time time_duration each_of_interval duration interval_to_duration format_duration_string parse_iso_duration clamp_date round_to_nearest date_part date_components_all set_components days_in_month convert_units time_add is_valid date_predicate date_predicates unix_convert min_max locale_data next_prev_weekday

1. Core & Formatting

now

Get current date and time, optionally formatted or adjusted for a target timezone.

coremcp tool

ParameterTypeRequiredDescription
formatstringoptionalOutput format token string (e.g. YYYY-MM-DD HH:mm:ss)
timezonestringoptionalTarget IANA timezone (e.g. America/New_York)

Request / Response Copy

{ "format": "YYYY-MM-DD HH:mm:ss", "timezone": "America/New_York" }

"2026-08-11 14:02:00"

LLMs Samples Queries

  • What is the current date and time?
  • What is the time right now in New York formatted as YYYY-MM-DD HH:mm:ss?
  • Give me today's date and current time.

format_date

Format an incoming date into a custom localized token string.

formattingmcp tool

ParameterTypeRequiredDescription
datestringrequiredDate string or now
formatstringrequiredFormat pattern (e.g. dddd, MMMM D, YYYY)
inputFormatstringoptionalParse format for non-standard date inputs
timezonestringoptionalTarget IANA timezone

{ "date": "2026-08-11T14:02:00Z", "format": "dddd, MMMM D, YYYY" }

"Tuesday, August 11, 2026"

  • Show only the month from 2026-08-11.
  • Can you reformat '2026/08/11' into 'DD/MM/YYYY'?
  • Display this timestamp in full written words: 2026-08-11.

parse_date

Deconstruct a date string into structured components (year, month, ISO week, quarter, Unix, etc.).

parsermcp tool

ParameterTypeRequiredDescription
datestringrequiredDate string to parse
inputFormatstringoptionalParse format for non-standard input strings

{ "date": "2026-08-11" }

{ "year": 2026, "month": 8, "day": 11, "dayOfWeek": 2, "dayOfWeekName": "Tuesday", "weekOfYear": 33, "quarter": 3, "unix": 1786406400, "iso": "2026-08-11T00:00:00.000Z" }

  • Break down '2026-08-11' into its calendar components.
  • What day of the week and week number was August 11, 2026?
  • Extract the quarter, year, and ISO week from '2026-08-11'.

adjust_time

Add or subtract specified time units from a base date.

mathmcp tool

ParameterTypeRequiredDescription
datestringoptionalBase date or now
amountnumberrequiredQuantity to shift
unitstringrequiredUnit (millisecond, second, minute, hour, day, week, month, quarter, year)
operationenumoptionaladd or subtract (default: add)
formatstringoptionalOutput format pattern

{ "date": "2026-08-11", "amount": 3, "unit": "months" }

"2026-11-11T00:00:00.000Z"

  • What date will it be 3 months from August 11, 2026?
  • Subtract 45 minutes from 10:00 AM today.
  • Add 3 weeks to 2026-08-11.

boundary_of

Get start or end boundary of a unit (year, quarter, month, week, isoWeek, day, hour) for a date.

boundarymcp tool

ParameterTypeRequiredDescription
datestringoptionalDate or now
unitenumrequiredyear | quartermonthweekisoWeekdayhourminutesecond
edgeenumoptionalstart or end (default: start)
formatstringoptionalOutput format string

{ "date": "2026-08-11", "unit": "month", "edge": "end" }

"2026-08-31T23:59:59.999Z"

  • What is the end of August 2026?
  • When does the current week end?.
  • When does Q3 2026 end?

get_date_format

Resolve English date component terms ('month name', 'unix milliseconds') into format tokens or compose format strings.

utilitymcp tool

ParameterTypeRequiredDescription
partstring | arrayrequiredPlain English part name(s) or __list__
verbosebooleanoptionalReturn full descriptors (token, description, example)
composebooleanoptionalJoin array of parts into a ready format string
separatorstringoptionalSeparator when compose is true (default: '')

{ "part": ["full year", "month", "day"], "compose": true, "separator": "-" }

"YYYY-MM-DD"

  • What format tokens should I use for 'year-month-day'?
  • Compose a format string with full year, month name, and day.
  • What is the formatting token for full month name?

format_standard

Format date according to standardized specifications: ISO 8601, ISO 9075, RFC 3339, or RFC 7231 (HTTP).

standardmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate or now
standardenumoptionaliso | iso9075rfc3339rfc7231 (default: iso)
representationenumoptionalFor ISO mode: complete | datetime

{ "date": "2026-08-11T14:30:00Z", "standard": "rfc7231" }

"Tue, 11 Aug 2026 14:30:00 GMT"

  • Format August 11, 2026 into HTTP RFC 7231 header date format.
  • Convert this date into standard ISO 8601 string format.
  • Generate an RFC 3339 timestamp for right now.

parse_strict

Strictly parse inputs from ISO strings, JSON date strings, Unix seconds, or Unix milliseconds.

parsermcp tool

ParameterTypeRequiredDescription
inputstring | numberrequiredValue to parse
inputTypeenumoptionaliso | jsonunix_sunix_ms (default: iso)
formatstringoptionalOptional format pattern for output string

{ "input": 1786406400, "inputType": "unix_s" }

{ "input": 1786406400, "inputType": "unix_s", "iso": "2026-08-11T00:00:00.000Z", "unix": 1786406400, "unixMs": 1786406400000 }

  • Parse this Unix timestamp 1786406400 in seconds into an ISO date.
  • Strictly parse "2026-08-11" and convert it to an ISO timestamp.
  • Convert Unix epoch milliseconds 1786406400000 into a human readable date.

to_representation

Convert a date object into alternate representations: array, object, JSON, UTC string, or ISO string.

conversionmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate string or now
outputenumrequiredarray | objectjsonutcStringisoString

{ "date": "2026-08-11", "output": "array" }

[2026, 7, 11, 0, 0, 0, 0]

  • Convert '2026-08-11' into an array of date numbers.
  • Export this date as a raw JavaScript date object representation.
  • Give me '2026-08-11' as a UTC string.

utc_date

Parse or convert a date in UTC mode, preserving or converting local wall clock values.

utcmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate string or now
formatstringoptionalOutput format pattern
keepLocalTimebooleanoptionalRetain local time numbers when converting to UTC

{ "date": "2026-08-11T12:00:00", "keepLocalTime": true }

"2026-08-11T12:00:00.000Z"

  • Convert local time 12:00 to UTC while keeping the local time numbers.
  • Get the UTC date representation for August 11, 2026.
  • Parse '2026-08-11T12:00:00' directly in UTC.

2. Difference & Comparison

date_diff

Calculate exact differences between two dates (returns scalar value or detailed breakdown).

mathmcp tool

ParameterTypeRequiredDescription
date1stringrequiredFirst date (ISO format or now)
date2stringrequiredSecond date to compare against
unitstringoptionalUnit for scalar diff (omit for full breakdown)
floatbooleanoptionalReturn floating-point scalar diff

{ "date1": "2026-08-11", "date2": "2026-12-25" }

{ "date1": "2026-08-11", "date2": "2026-12-25", "days": 136, "weeks": 19.43, "months": 4.47, "years": 0.3723, "formatted": "19 weeks and 3 days" }

  • How many days are between August 11, 2026 and December 25, 2026?
  • Calculate the difference in weeks and days between these two dates.

calc_age

Calculate exact age in years, months, days, total weeks, and total days relative to target date.

humanmcp tool

ParameterTypeRequiredDescription
birthDatestringrequiredBirth date string (YYYY-MM-DD). Alias: birth_date
targetDatestringoptionalComparison reference date (defaults to today). Alias: reference_date

{ "birthDate": "1995-05-15", "targetDate": "2026-08-11" }

{ "birthDate": "1995-05-15", "years": 31, "months": 2, "days": 27, "totalDays": 11411, "totalWeeks": 1630, "formatted": "31 years, 2 months, 27 days" }

  • How old is someone born on May 15, 1995 as of August 11, 2026?
  • Calculate exact age in years, months, and days for May 15, 1995.
  • How many total weeks old is a person born on 1995-05-15?

compare_dates

Evaluate boolean date comparison predicates: isBefore, isAfter, isSame, isSameOrBefore, isSameOrAfter.

comparisonmcp tool

ParameterTypeRequiredDescription
date1stringoptionalFirst date or now
date2stringrequiredSecond date to compare against
comparisonenumrequiredisBefore | isAfterisSameisSameOrBeforeisSameOrAfter
unitstringoptionalComparison unit granularity (e.g. month, day)

{ "date1": "2026-08-11", "date2": "2026-08-15", "comparison": "isBefore" }

true

  • Is August 11, 2026 before August 15, 2026?
  • Check if date A is equal to date B ignoring time.
  • Is 2026-08-11 after 2026-08-01?

is_between

Check if a date falls between start and end boundaries with configurable inclusivity options.

ParameterTypeRequiredDescription
datestringoptionalTarget date or now
startstringrequiredRange start date
endstringrequiredRange end date
unitstringoptionalComparison unit granularity
inclusivityenumoptional() | (][)[] (default: ())

{ "date": "2026-08-11", "start": "2026-08-01", "end": "2026-08-31", "inclusivity": "[]" }

true

  • Is today between 2025-01-01 and 2025-12-31?
  • Does August 11, 2026 fall within the range August 1 to August 31, 2026?
  • Check if '2026-08-11' is strictly between two boundary dates.

date_compare

Run complete date comparison matrix across all unit granularities simultaneously.

ParameterTypeRequiredDescription
date1stringrequiredFirst date string or now
date2stringrequiredSecond date string or now

{ "date1": "2026-08-11", "date2": "2026-08-15" }

{ "compareAsc": -1, "compareDesc": 1, "isSameDay": false, "isSameWeek": true, "isSameMonth": true, "isSameQuarter": true, "isSameYear": true }

  • Compare two dates across all units like same week, same month, same year.
  • Are August 11, 2026 and August 15, 2026 in the same month and week?
  • Get full comparative breakdown between 2026-08-11 and 2026-08-15.

relative_time

Get a human-readable relative time expression (e.g. '3 days ago', 'in 2 months').

relativemcp tool

ParameterTypeRequiredDescription
datestringoptionalDate or now
relativeTostringoptionalReference date instead of current time
withoutSuffixbooleanoptionalOmit 'ago' / 'in' suffix
directionenumoptionalfrom or to (default: from)

{ "date": "2026-08-01", "relativeTo": "2026-08-11" }

"10 days ago"

  • How long ago was August 1, 2026 compared to August 11, 2026?
  • Format August 1, 2026 as relative time (e.g. '10 days ago').
  • Express the date difference human-readably without suffixes.

intl_format_distance

Locale-aware relative time formatting utilizing standard Intl.RelativeTimeFormat.

i18nmcp tool

ParameterTypeRequiredDescription
datestringoptionalTarget date (default: now)
baseDatestringoptionalReference comparison date (default: now)
localestringoptionalBCP 47 locale tag (e.g. en, fr, es)
numericenumoptionalauto or always
styleenumoptionallong | shortnarrow
unitstringoptionalExplicit unit (second, minute, hour, day, week, month, year)

{ "date": "2026-08-14", "baseDate": "2026-08-11", "locale": "es" }

{ "formatted": "dentro de 3 días", "unit": "day", "value": 3, "locale": "es" }

  • Show relative time distance in Spanish ('dentro de 3 días') for August 14.
  • Get localized relative time distance between August 11 and August 14, 2026.

closest_date

Find which date in an array of candidates is nearest to a reference date.

searchmcp tool

ParameterTypeRequiredDescription
datestringoptionalReference date (defaults to now)
datesarrayrequiredArray of candidate date strings
formatstringoptionalOutput formatting string

{ "date": "2026-08-11", "dates": ["2026-01-01", "2026-08-10", "2026-12-31"] }

{ "closestIndex": 1, "closestDate": "2026-08-10T00:00:00.000Z", "diffMs": 86400000 }

  • Which date in this list [2026-01-01, 2026-08-10, 2026-12-31] is closest to August 11, 2026?

interval_overlap

Determine if two date intervals overlap and calculate overlapping days count.

intervalmcp tool

ParameterTypeRequiredDescription
start1stringrequiredStart of interval 1
end1stringrequiredEnd of interval 1
start2stringrequiredStart of interval 2
end2stringrequiredEnd of interval 2
inclusivebooleanoptionalInclude boundary touching as overlap
modeenumoptionaloverlapping or days

{ "start1": "2026-08-01", "end1": "2026-08-15", "start2": "2026-08-10", "end2": "2026-08-20", "mode": "days" }

{ "overlaps": true, "overlapDays": 5, "overlapStart": "2026-08-10T00:00:00.000Z", "overlapEnd": "2026-08-15T00:00:00.000Z" }

  • Do the date ranges Aug 1-15 and Aug 10-20 overlap?
  • Calculate how many days overlap between two event schedules.
  • Check if interval 2026-08-01 to 2026-08-15 intersects with 2026-08-10 to 2026-08-20.

3. Business & Calendar

business_days

Count work days (Mon–Fri) between dates or add/subtract business days from a starting date.

businessmcp tool

ParameterTypeRequiredDescription
modeenumoptionaldiff | addsubtract (default: diff)
startDatestringoptionalStart date string
endDatestringoptionalEnd date (for diff mode)
amountnumberoptionalBusiness days count (for add/subtract)
formatstringoptionalOutput formatting pattern

{ "mode": "add", "startDate": "2026-08-07", "amount": 5 }

{ "original": "2026-08-07", "amount": 5, "result": "2026-08-14" }

  • Add 5 business days to Friday, August 7, 2026.
  • How many work days are there between August 1 and August 15, 2026?
  • Subtract 10 business days from August 11, 2026.

work_days

Calculate working days between two dates with optional weekend inclusion flags.

workmcp tool

ParameterTypeRequiredDescription
startDatestringrequiredStart date (YYYY-MM-DD)
endDatestringrequiredEnd date (YYYY-MM-DD)
includeWeekendsbooleanoptionalInclude Saturday and Sunday (default: false)

{ "startDate": "2026-08-01", "endDate": "2026-08-11" }

{ "startDate": "2026-08-01", "endDate": "2026-08-11", "workDaysCount": 7, "weekendsIncluded": false }

  • Count the total working days between 2026-08-01 and 2026-08-11.
  • How many days excluding weekends are in the first half of August 2026?

calendar_month

Generate a complete month calendar matrix structured into week arrays for calendar UI displays.

calendarmcp tool

ParameterTypeRequiredDescription
datestringoptionalReference date in target month
weekStartenumoptional0 (Sunday) or 1 (Monday)
formatstringoptionalDate string output format pattern

{ "date": "2026-08-01", "weekStart": 1 }

{ "month": "August 2026", "year": 2026, "daysInMonth": 31, "weeks": [ /* Arrays containing week objects */ ] }

  • Generate a full month calendar matrix for August 2026 starting on Monday.
  • Get all weeks and dates in August 2026 structured for UI calendar layout.
  • Build a monthly calendar view grid for August 2026.

each_weekend_of

Get array of all weekend dates (Saturday and Sunday) within a specified interval, month, or year.

calendarmcp tool

ParameterTypeRequiredDescription
modeenumoptionalinterval | monthyear (default: interval)
datestringoptionalReference date for month or year mode
startstringoptionalStart date for interval mode
endstringoptionalEnd date for interval mode

{ "mode": "month", "date": "2026-08-01" }

{ "mode": "month", "count": 10, "weekends": ["2026-08-01", "2026-08-02", "2026-08-08", "..."] }

  • List all weekend dates (Saturdays and Sundays) in August 2026.
  • Get every weekend day date in the year 2026.
  • Find all weekend dates between August 1 and August 31, 2026.

day_of_week

Get day name, month name, year, weekend flag, day of year, and week number for any date.

metadatamcp tool

ParameterTypeRequiredDescription
datestringrequiredDate string (YYYY-MM-DD)

{ "date": "2026-08-11", "dayName": "Tuesday", "month": "August", "dayNumber": 11, "year": 2026, "isWeekend": false, "dayOfYear": 223, "weekNumber": 2 }

  • What day of the week is August 11, 2026?
  • Is August 11, 2026 a weekend or weekday?
  • What is the day of year number for August 11, 2026?

last_day_of

Return the last day of a period (month, year, quarter, week, isoWeek, decade).

boundarymcp tool

ParameterTypeRequiredDescription
datestringoptionalReference date or now
unitenumrequiredmonth | yearquarterweekisoWeekisoWyeardecade
formatstringoptionalOutput format pattern

{ "date": "2026-08-11", "unit": "quarter" }

{ "input": "2026-08-11", "unit": "quarter", "lastDay": "2026-09-30" }

  • What is the last day of Q3 2026?
  • Find the last day of the month for August 2026.
  • What is the last day of the decade for 2026-08-11?

countdown

Generate structured remaining time or elapsed time breakdowns relative to a target timestamp.

timermcp tool

ParameterTypeRequiredDescription
datestringrequiredTarget date or timestamp
formatstringoptionalFormatting string for target date output

{ "date": "2027-01-01T00:00:00Z" }

{ "target": "2027-01-01T00:00:00.000Z", "isFuture": true, "breakdown": { "days": 142, "hours": 9, "minutes": 58, "seconds": 0 }, "formatted": "142d 9h 58m 0s" }

  • How many days, hours, and minutes remain until New Year 2027?
  • Generate a live countdown breakdown to 2027-01-01T00:00:00Z.
  • How much time is left until midnight on January 1, 2027?

4. Timezones & World Clock

convert_timezone

Project timestamps across world IANA timezones while handling DST transitions seamlessly.

timezonesmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate string or now
fromTimezonestringoptionalOrigin IANA timezone (e.g. UTC)
toTimezonestringrequiredDestination IANA timezone (e.g. Asia/Tokyo)
formatstringoptionalOutput formatting pattern

{ "date": "2026-08-11T12:00:00", "fromTimezone": "UTC", "toTimezone": "Asia/Tokyo" }

"2026-08-11T21:00:00+09:00"

  • What time is 12:00 PM UTC in Tokyo (Asia/Tokyo)?
  • Convert 2026-08-11 14:00 from America/New_York to Europe/London.
  • Project a UTC timestamp into Tokyo local time.

local_time

Get current local time, date, timezone name, and offset for the runtime execution environment.

systemmcp tool

Takes no required parameters. Inspects local system environment clock and locale settings.

{}

{ "local_time": "15:28:00", "local_date": "Tuesday, August 11, 2026", "timezone": "America/New_York", "timezone_offset_mins": 240 }

  • What is my system's local time, date, and timezone offset?
  • Show current local time and timezone for this server.
  • Get the local system clock and UTC offset in minutes.

world_time

Query active local time, country flags, and offsets across major cities or global world regions.

worldmcp tool

ParameterTypeRequiredDescription
querystringoptionalCity or country name (e.g. Tokyo, Germany)
regionenumoptionalFilter region (All | AfricaAmericasAsiaEuropeOceania)
timezonestringoptionalDirect IANA timezone string
offset_hoursnumberoptionalUTC offset hours fallback

{ "query": "Tokyo" }

{ "query": "Tokyo", "match_count": 1, "results": [ { "flag": "🇯🇵", "country": "Japan", "city": "Tokyo", "timezone": "Asia/Tokyo", "time": "23:02:00", "offset_string": "GMT+9" } ] }

  • What time is it in Japan right now?
  • Show the current time and GMT offset for Tokyo.
  • Search local time for major cities in Europe.

time_duration

Calculate duration between two wall clock time strings (HH:MM or HH:MM:SS), handling overnight shifts automatically.

timemcp tool

ParameterTypeRequiredDescription
startstringrequiredStart time (e.g. 22:00)
endstringrequiredEnd time (e.g. 06:30)

{ "start": "22:00", "end": "06:30" }

{ "start": "22:00", "end": "06:30", "hours": 8, "minutes": 30, "total_seconds": 30600, "display": "8h 30m 0s" }

  • How many hours and minutes passed between 10:00 PM and 6:30 AM next morning?
  • Calculate duration between start time 09:00 and end time 17:30.
  • What is the time difference in hours between 22:00 and 06:30?

5. Intervals & Durations

each_of_interval

Generate an array of step dates/times across an interval boundary.

generatormcp tool

ParameterTypeRequiredDescription
startstringrequiredInterval start ISO string
endstringrequiredInterval end ISO string
unitenumoptionalday | hourminutemonthquarterweekyear (default: day)
stepnumberoptionalStep increment size (default: 1)
formatstringoptionalOutput formatting pattern

{ "start": "2026-08-01", "end": "2026-08-03", "unit": "day" }

{ "count": 3, "dates": [ "2026-08-01T00:00:00.000Z", "2026-08-02T00:00:00.000Z", "2026-08-03T00:00:00.000Z" ] }

  • List every daily step date between August 1, 2026 and August 3, 2026.
  • Generate hourly intervals between 2026-08-01T00:00 and 2026-08-01T12:00.
  • Create an array of weekly dates across August 2026.

duration

Create and inspect durations from ISO strings, millisecond numbers, or unit object descriptors.

durationmcp tool

ParameterTypeRequiredDescription
inputstring | numberobjectrequiredISO 8601 string (P1Y2M), ms number, or unit object
unitstringoptionalUnit when input is a scalar number
outputFormatenumoptionaliso | humanizemillisecondsobject

{ "input": "P1Y2M3D", "outputFormat": "object" }

{ "years": 1, "months": 2, "days": 3, "hours": 0, "minutes": 0, "totalMilliseconds": 36979200000 }

  • Parse ISO duration 'P1Y2M3D' into structured years, months, and days.
  • Convert 36979200000 milliseconds into human readable duration.
  • Create a duration object from 2 hours and 30 minutes.

interval_to_duration

Convert start and end dates into a structured duration object broken down into years, months, days, etc.

durationmcp tool

ParameterTypeRequiredDescription
startstringrequiredInterval start ISO string
endstringrequiredInterval end ISO string

{ "start": "2025-01-01", "end": "2026-08-11" }

{ "years": 1, "months": 7, "days": 10, "humanized": "a year" }

  • Convert interval from 2025-01-01 to 2026-08-11 into years, months, and days.
  • How many years and months are between two specific dates?
  • Get structured breakdown duration between start date and end date.

format_duration_string

Build a formatted English text string from duration component numbers.

durationmcp tool

ParameterTypeRequiredDescription
years, months, weeks, days, hours, minutes, secondsnumberoptionalIndividual numeric duration parts
formatarrayoptionalLimit units shown (e.g. ["hours", "minutes"])
delimiterstringoptionalUnit separator (default: , )
zerobooleanoptionalInclude zero value units (default: false)

{ "hours": 2, "minutes": 30 }

{ "formatted": "2 hours, 30 minutes", "humanized": "in 3 hours", "iso": "PT2H30M" }

  • Format 90 minutes as hour, minutes..
  • Convert duration parts (2 hours, 30 mins) into an ISO string or English phrase.

parse_iso_duration

Parse an ISO 8601 duration string (e.g. 'P1Y2M3DT4H') into an object with all components.

durationmcp tool

ParameterTypeRequiredDescription
isostringrequiredISO 8601 duration string (e.g. P1Y6M, PT2H30M)

{ "iso": "PT2H30M" }

{ "hours": 2, "minutes": 30, "seconds": 0, "totalMilliseconds": 9000000, "humanized": "in 3 hours" }

  • Parse the ISO 8601 duration string 'PT2H30M'.
  • Extract hours, minutes, and total milliseconds from 'P1Y6M'.
  • Decode ISO duration 'PT1H45M' into standard component object.

clamp_date

Clamp a date within start and end interval boundaries.

mathmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate to clamp (defaults to now)
startstringrequiredLower bound date
endstringrequiredUpper bound date
formatstringoptionalOutput formatting pattern

{ "date": "2026-12-31", "start": "2026-01-01", "end": "2026-08-31" }

{ "clamped": "2026-08-31T00:00:00.000Z", "wasClamped": true }

  • Clamp '2026-12-31' within bounds '2026-01-01' and '2026-08-31'.
  • Ensure date does not exceed maximum allowable deadline August 31, 2026.
  • Check if date was clamped when constrained between range boundaries.

round_to_nearest

Round date/time to nearest N minutes or N hours using floor, ceil, or standard rounding.

mathmcp tool

ParameterTypeRequiredDescription
datestringoptionalTarget date or now
unitenumoptionalminutes or hours (default: minutes)
nearestTonumberoptionalStep increment (e.g. 15 for quarter hour)
roundingMethodenumoptionalround | floorceil

{ "date": "2026-08-11T14:23:00Z", "nearestTo": 15 }

{ "result": "2026-08-11T14:30:00.000Z" }

  • Round 14:23:00 to the nearest 15 minutes.
  • Floor current time to nearest 30 minute interval.

6. Components & Setters

date_part

Extract a specific date part: week, isoWeek, isoWeekday, quarter, dayOfYear, or weekday.

componentmcp tool

ParameterTypeRequiredDescription
datestringoptionalDate or now
partenumrequiredweek | isoWeekisoWeekdayquarterdayOfYearweekday

{ "date": "2026-08-11", "part": "dayOfYear" }

223

  • Get the day of year number for August 11, 2026.
  • What quarter of the year is August 11 in?
  • Extract the ISO week number for 2026-08-11.

date_components_all

Retrieve every numeric and calendar component at once (year, month, date, hour, ISO week, quarter, Unix, decade, etc.).

ParameterTypeRequiredDescription
datestringoptionalDate string or now

{ "year": 2026, "month": 8, "date_": 11, "dayOfWeek": 2, "isoDay": 2, "dayOfYear": 223, "daysInMonth": 31, "quarter": 3, "unix": 1786406400 }

  • Retrieve every component (year, month, date, quarter, day of year) for August 11, 2026.
  • Get full numeric and text date breakdown for 2026-08-11.
  • Show all temporal values for current date.

set_components

Set specific numeric date/time components on a base date and return the resulting timestamp.

settermcp tool

ParameterTypeRequiredDescription
datestringoptionalBase date or now
year, month, day, hour, minute, second, millisecondnumberoptionalSpecific field values to modify
dayOfYear, quarter, week, isoWeek, isoDay, isoWeekYear, weekYearnumberoptionalCalendar field modifications

{ "date": "2026-08-11", "month": 12, "day": 25 }

{ "original": "2026-08-11T00:00:00.000Z", "result": "2026-12-25T00:00:00.000Z" }

  • Set month to December and day to 25 on date '2026-08-11'.
  • Modify year to 2028 for date '2026-08-11'.
  • Set time to 15:30:00 on August 11, 2026.

days_in_month

Return total number of days in the month for a given date.

calendarmcp tool

{ "date": "2024-02-15" }

29

  • How many days are in February 2024?
  • What is the total day count in August 2026?
  • Check how many days are in the month for '2026-02-15'.

convert_units

Convert a numeric value between time units (seconds, minutes, hours, days, weeks, months, years).

ParameterTypeRequiredDescription
valuenumberrequiredNumeric quantity to convert
fromstringrequiredSource unit (e.g. hours, days)
tostringrequiredTarget unit (e.g. minutes, weeks)

{ "value": 36, "from": "hours", "to": "days" }

{ "value": 36, "from": "hours", "to": "days", "result": 1.5 }

  • Convert 36 hours into days.
  • How many minutes are in 2.5 hours?
  • Convert 14 days into weeks.

time_add

Add or subtract hours, minutes, and/or seconds to a wall clock time string.

timemcp tool

ParameterTypeRequiredDescription
timestringrequiredBase wall clock time (e.g. 14:30:00)
add_hoursnumberoptionalHours to add (negative to subtract)
add_minutesnumberoptionalMinutes to add
add_secondsnumberoptionalSeconds to add

{ "time": "14:30:00", "add_minutes": 45 }

{ "original": "14:30:00", "result": "15:15:00" }

  • Add 45 minutes to 14:30:00.
  • Subtract 2 hours from wall time 01:15:00.
  • Add 3 hours and 15 minutes to 09:00:00.

7. Validation & Predicates

is_valid

Check whether a date string represents a valid, parseable calendar date.

validationmcp tool

ParameterTypeRequiredDescription
datestringrequiredDate string to validate
inputFormatstringoptionalExpected parsing format pattern

{ "date": "2026-02-31" }

false

  • Is '2026-02-31' a valid calendar date?
  • Check if string '2026-08-11' is a valid date.
  • Validate if '2025-13-40' can be parsed as a real date.

date_predicate

Test specific boolean predicates on a date: isLeapYear, isToday, isTomorrow, isYesterday.

predicatemcp tool

ParameterTypeRequiredDescription
datestringoptionalTarget date string or now
predicateenumrequiredisLeapYear | isTodayisTomorrowisYesterday

{ "date": "2024-08-11", "predicate": "isLeapYear" }

true

  • Is 2024 a leap year?
  • Is August 11, 2026 today?
  • Check if '2026-08-10' is yesterday.

date_predicates

Run all calendar and temporal boolean predicates simultaneously for a date.

ParameterTypeRequiredDescription
datestringoptionalTarget date or now

{ "isTuesday": true, "isWeekend": false, "isWeekday": true, "isLeapYear": false, "isThisMonth": true, "isThisYear": true }

  • Check all boolean flags (isTuesday, isWeekend, isLeapYear, isThisMonth) for August 11, 2026.
  • Run all calendar predicates on '2026-08-11'.
  • Is 2026-08-11 a weekday, weekend, or leap year?

unix_convert

Convert between date strings and Unix timestamps (seconds & milliseconds).

ParameterTypeRequiredDescription
datestringoptionalDate string (for to_unix mode)
fromUnixnumberoptionalUnix timestamp in seconds (shorthand conversion)
modeenumoptionalto_unix or from_unix (default: to_unix)

{ "fromUnix": 1786406400 }

"2026-08-11T00:00:00.000Z"

  • Convert Unix timestamp 1786406400 to an ISO date string.
  • Get the Unix epoch seconds timestamp for '2026-08-11'.
  • Convert 1786406400 seconds into standard UTC date.

min_max

Find the earliest (min) or latest (max) date from an array of date strings.

searchmcp tool

ParameterTypeRequiredDescription
datesarrayrequiredArray of candidate date strings
operationenumrequiredmin (earliest) or max (latest)
formatstringoptionalOutput formatting pattern

{ "dates": ["2026-01-01", "2026-08-11", "2026-12-25"], "operation": "max" }

"2026-12-25T00:00:00.000Z"

  • Find the latest date among ['2026-01-01', '2026-08-11', '2026-12-25'].
  • Which date is earliest in this array of date strings?
  • Get maximum (latest) date from my list of project milestones.

locale_data

Retrieve locale metadata arrays (months, short months, weekday names, first day of week).

i18nmcp tool

ParameterTypeRequiredDescription
partenumrequiredmonths | monthsShortweekdaysweekdaysShortweekdaysMinfirstDayOfWeek
localestringoptionalTarget locale code (default: en)

{ "part": "months" }

[ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]

  • Get array of full month names in English.
  • Get short weekday names for English locale.
  • What is the first day of week in English locale data?

next_prev_weekday

Find the next or previous occurrence of a specific weekday relative to a start date.

calendarmcp tool

ParameterTypeRequiredDescription
datestringoptionalStart reference date (default: now)
weekdaystring | numberrequiredTarget day: 0–6 or weekday name (monday, friday)
directionenumoptionalnext or previous (default: next)
formatstringoptionalOutput formatting pattern

{ "date": "2026-08-11", "weekday": "friday", "direction": "next" }

{ "from": "2026-08-11", "direction": "next", "weekdayRequested": "friday", "result": "2026-08-14" }

  • When is the next Friday relative to August 11, 2026?
  • Find the previous Monday before August 11, 2026.
  • What date will be the next Sunday?