Skip to content

Commit ff6b425

Browse files
committed
fix(google-calendar): make list orderBy user-selectable, clarify update timeZone applies to start/end
1 parent ddece36 commit ff6b425

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

apps/sim/blocks/blocks/google_calendar.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,18 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
278278
placeholder: 'standup',
279279
condition: { field: 'operation', value: 'list' },
280280
},
281+
{
282+
id: 'orderBy',
283+
title: 'Order By',
284+
type: 'dropdown',
285+
condition: { field: 'operation', value: 'list' },
286+
mode: 'advanced',
287+
options: [
288+
{ label: 'Start time', id: 'startTime' },
289+
{ label: 'Last updated', id: 'updated' },
290+
],
291+
value: () => 'startTime',
292+
},
281293
{
282294
id: 'pageToken',
283295
title: 'Page Token',
@@ -837,6 +849,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
837849
timeMin: { type: 'string', description: 'Start time filter' },
838850
timeMax: { type: 'string', description: 'End time filter' },
839851
q: { type: 'string', description: 'Free-text search query' },
852+
orderBy: { type: 'string', description: 'Event ordering (startTime or updated)' },
840853
maxResults: { type: 'string', description: 'Maximum number of results' },
841854
pageToken: { type: 'string', description: 'Pagination token from a previous response' },
842855

apps/sim/tools/google_calendar/list.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ export const listTool: ToolConfig<GoogleCalendarListParams, GoogleCalendarListRe
6565
orderBy: {
6666
type: 'string',
6767
required: false,
68-
visibility: 'hidden',
69-
description: 'Order of events returned (startTime or updated). Defaults to startTime.',
68+
visibility: 'user-or-llm',
69+
description:
70+
'Order of events: startTime (chronological, the default) or updated (last-modified). startTime is always valid here because singleEvents is set.',
7071
},
7172
showDeleted: {
7273
type: 'boolean',

apps/sim/tools/google_calendar/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const updateTool: ToolConfig<GoogleCalendarUpdateParams, GoogleCalendarUp
8383
required: false,
8484
visibility: 'user-or-llm',
8585
description:
86-
'IANA time zone (e.g., America/Los_Angeles). Used as-is when provided. For recurring events a time zone is required to expand the recurrence correctly; for one-off events it is only needed when the datetime omits a UTC offset.',
86+
'IANA time zone (e.g., America/Los_Angeles) applied to the start/end times provided in this update. Provide a new start and/or end time to change the time zone; a time zone on its own is not applied. Required for recurring events to expand the recurrence correctly.',
8787
},
8888
attendees: {
8989
type: 'array',

0 commit comments

Comments
 (0)