Skip to main content

Reference data & utilities

These tools support the others by translating human-friendly date phrases into concrete ranges. Master-data enumeration (categories, time markers) is exposed as data sources, not tools - read dimescheduler://categories or dimescheduler://time-markers instead of calling a tool.

Parse relative time

Tool: parse_relative_time

Converts a natural-language relative time expression ("this week", "5 days ago", "in 3 months") into concrete UTC and local-time ranges. Use this before calling tools that take an explicit startDateTime / endDateTime whenever the user phrases a date relatively.

ParameterTypeRequiredDescription
expressionstringYesNatural-language expression to parse (e.g. this week, next month, 5 days ago)
timeZonestringYesIANA timezone identifier
referenceTimestringNoReference time in ISO 8601 (defaults to the current time in the specified time zone)

Supported expressions

  • this week, next week, last week (Monday → Sunday)
  • this month, next month, last month
  • this year, next year, last year
  • today, tomorrow, yesterday
  • Numeric offsets: 5 days ago, 2 weeks from now, in 3 months, …
Weeks start on Monday

The parser uses Monday as the first day of the week, regardless of locale. If your assistant is built for a Sunday-start locale, account for the off-by-one.

Example prompt

"Parse 'next week' in Europe/Brussels timezone."