Maps “last week” / “this month” / “yesterday” / “Q1 2026” to deterministicDocumentation Index
Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
Use this file to discover all available pages before exploring further.
{start, end, timezone, days_inclusive} bounds based on the space’s configured timezone. Prevents off-by-one errors at week / month / DST boundaries that come from the model doing the math itself.
When to use
- Any time the user says a relative date phrase and you want a reproducible start/end you can pass into
query_ad_metricsorlist_events. - Cross-platform comparisons that need the same window definition across multiple tool calls.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
preset | string | Conditional | Exact DateRange preset (last_7_days, this_week, last_month, etc.). |
relative | string | Conditional | Freeform phrase like "last week", "yesterday", "this month". The server matches it to a preset. |
format | string | No | json (default), csv, or yaml. |
preset or relative. preset wins when both are present.
Output
dst_caveat field is only included when the window crosses a DST transition in the space’s timezone.
Supported relative phrases
today, yesterday, this week, last week, this month, last month, this quarter, last quarter, this year, last year, last 7 days, last 14 days, last 30 days, last 60 days, last 90 days, last 365 days, all time.
Substring matches work ("compare last week to the week before" resolves to last_week). Ambiguous phrases return a [validation_error] with a hint listing the supported presets.
Caveats
Attribution windows inquery_ad_metrics are calendar-day-based (UTC), not 24-hour rolling. Across DST transitions a 7-day window may span 6d 23h or 7d 1h. The dst_caveat field flags this — surface it in your reply when explaining period-over-period changes that cross a DST boundary.