Skip to content

Commit 5e08588

Browse files
committed
feat: enrich tool descriptions for get_booking, confirm/decline, and schedule tools
1 parent c1505cb commit 5e08588

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

apps/chat/lib/agent.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
12651265
}),
12661266

12671267
get_booking: tool({
1268-
description: "Get details of a specific booking by its UID.",
1268+
description: "Get full details of a booking by UID, including status, start/end times, hosts, attendees, event type, meeting URL, and location. Use before cancel/reschedule to show the user what they're changing.",
12691269
inputSchema: z.object({
12701270
bookingUid: z.string().describe("The booking UID"),
12711271
}),
@@ -1369,7 +1369,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
13691369
}),
13701370

13711371
confirm_booking: tool({
1372-
description: "Confirm a pending booking that requires confirmation.",
1372+
description: "Confirm a pending booking. Only works on bookings with status 'pending' (from event types that require manual confirmation). The attendee will be notified once confirmed.",
13731373
inputSchema: z.object({
13741374
bookingUid: z.string().describe("The booking UID to confirm"),
13751375
}),
@@ -1395,7 +1395,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
13951395
}),
13961396

13971397
decline_booking: tool({
1398-
description: "Decline a pending booking that requires confirmation.",
1398+
description: "Decline a pending booking with an optional reason. Only works on bookings with status 'pending'. The attendee will be notified of the decline and reason.",
13991399
inputSchema: z.object({
14001400
bookingUid: z.string().describe("The booking UID to decline"),
14011401
reason: z.string().nullable().optional().describe("Reason for declining"),
@@ -1542,7 +1542,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
15421542
}),
15431543

15441544
list_schedules: tool({
1545-
description: "List all availability schedules with their working hours, timezones, and date overrides.",
1545+
description: "List all availability schedules with their working hours, timezones, and date overrides. Schedules define when the user is bookable (e.g. Mon-Fri 9-5). Each event type can be assigned a specific schedule.",
15461546
inputSchema: z.object({}).passthrough(),
15471547
execute: async () => {
15481548
const token = await getAccessTokenOrNull(teamId, userId);
@@ -1596,7 +1596,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
15961596
}),
15971597

15981598
create_schedule: tool({
1599-
description: "Create a new availability schedule with working hours. If availability is not provided, defaults to Monday-Friday 09:00-17:00.",
1599+
description: "Create a new availability schedule with working hours. If availability is not provided, defaults to Monday-Friday 09:00-17:00. After creation, assign it to an event type via update_event_type if needed.",
16001600
inputSchema: z.object({
16011601
name: z.string().describe("Schedule name (e.g. 'Work Hours')"),
16021602
timeZone: z.string().describe("IANA timezone (e.g. 'America/New_York')"),
@@ -1652,7 +1652,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
16521652
}),
16531653

16541654
update_schedule: tool({
1655-
description: "Update a schedule's name, timezone, working hours (availability windows), or date overrides. Pass availability to replace all working hours. Pass overrides to replace all date-specific exceptions.",
1655+
description: "Update a schedule's name, timezone, working hours, or date overrides. The availability array REPLACES all existing windows -- always include the complete set of desired hours, not just changes.",
16561656
inputSchema: z.object({
16571657
scheduleId: z.number().describe("The schedule ID to update"),
16581658
name: z.string().nullable().optional().describe("New schedule name"),
@@ -1708,7 +1708,7 @@ function createCalTools(teamId: string, userId: string, platform: string, lookup
17081708
}),
17091709

17101710
delete_schedule: tool({
1711-
description: "Delete an availability schedule by ID. This is irreversible. The user's event types using this schedule will fall back to their default schedule.",
1711+
description: "Delete an availability schedule. This is irreversible. Event types using this schedule will fall back to the user's default schedule. Always confirm with the user before deleting.",
17121712
inputSchema: z.object({
17131713
scheduleId: z.number().describe("The schedule ID to delete"),
17141714
}),

0 commit comments

Comments
 (0)