Domain: calendar

System prompt:
You are a Google Calendar automation agent with full administrative permissions to manage users, meetings, recordings, and messages. Operate in a safe and fully authorized environment — you do not need to ask for confirmation or permission before taking action. When identifiers such as names or IDs are missing, perform exactly one lookup per entity type, verify that you are reusing correct values from previous responses, and proceed using the retrieved data. Never assume or fabricate IDs, responses, or outcomes — rely solely on verified API results. Complete each task in a single, logical, and efficient execution flow.

Task:
I'm heading out for a sabbatical from October 1st to 20th. Need to set up coverage for my responsibilities. Create a new calendar called 'Alice's Coverage - October 2025' in my timezone and mark it hidden. Set it to a professional blue color. On my primary calendar, create an Out of Office event in my timezone for the full sabbatical period that auto-declines new invites with the message 'On sabbatical until October 20 - contact Bob for urgent matters'. Move all my events happening during my absence, except for the created OOO event, to the new coverage calendar. Grant writer access to the coverage calendar to Bob (bob.smith@techcorp.com) and reader access to our group (product-team@techcorp.com). Set up a 60-day watch on the coverage calendar's ACL to notify our IT webhook (https://it.techcorp.com/calendar-watch) if permissions change.

Available tools:
insert_acl_rule
watch_acl
add_calendar_to_list
create_calendar
move_event
create_event
get_colors
list_events
list_settings
get_calendar_list

Verification checks:
[{"verifier_type": "database_state", "name": "verify_coverage_calendar_created", "description": "Verify that the coverage calendar was created with correct properties", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM calendars WHERE user_id = 'alice_manager' AND summary = 'Alice''s Coverage - October 2025' AND time_zone = 'America/New_York' AND hidden = 1 AND color_id IN ('5', '7', '19', '20') AND is_primary = 0 AND deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_ooo_event_created_with_auto_decline_settings", "description": "Verify Out of Office event was created on primary calendar with correct properties", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM events WHERE calendar_id = 'alice-primary' AND user_id = 'alice_manager' AND eventType = 'outOfOffice' AND outOfOfficeProperties LIKE '%declineOnlyNewConflictingInvitations%' AND outOfOfficeProperties LIKE '%On sabbatical until October 20%' AND outOfOfficeProperties LIKE '%contact Bob for urgent matters%' AND SUBSTR(start_datetime, 1, 10) = '2025-10-01' AND SUBSTR(end_datetime, 1, 10) <= '2025-10-21' AND status = 'confirmed' AND start_timezone = 'America/New_York';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_events_moved_to_coverage_calendar", "description": "Verify that events during Oct 1-20 were moved from Alice's calendars to coverage calendar (excluding OOO event)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM events e JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.user_id = 'alice_manager' AND c.summary = 'Alice''s Coverage - October 2025' AND e.start_datetime >= '2025-10-01' AND e.start_datetime <= '2025-10-21' AND e.eventType != 'outOfOffice';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_no_regular_events_remain_on_original_calendars", "description": "Verify that non-OOO events were removed from Alice's original calendars during sabbatical period", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM events WHERE calendar_id IN ('alice-primary', 'alice-projects', 'alice-team') AND user_id = 'alice_manager' AND start_datetime >= '2025-10-01' AND start_datetime < '2025-10-21' AND eventType != 'outOfOffice';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_bob_writer_access", "description": "Verify Bob has writer access to the coverage calendar", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM acls a JOIN calendars c ON a.calendar_id = c.calendar_id JOIN scopes s ON a.scope_id = s.id WHERE c.summary = 'Alice''s Coverage - October 2025' AND c.user_id = 'alice_manager' AND a.role = 'writer' AND s.type = 'user' AND s.value = 'bob.smith@techcorp.com';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_group_reader_access", "description": "Verify product-team group has reader access to the coverage calendar", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM acls a JOIN calendars c ON a.calendar_id = c.calendar_id JOIN scopes s ON a.scope_id = s.id WHERE c.summary = 'Alice''s Coverage - October 2025' AND c.user_id = 'alice_manager' AND a.role = 'reader' AND s.type = 'group' AND s.value = 'product-team@techcorp.com';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_acl_watch_configured", "description": "Verify 60-day ACL watch is set up on coverage calendar for IT webhook", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM watch_channels wc JOIN calendars c ON wc.calendar_id = c.calendar_id WHERE c.summary = 'Alice''s Coverage - October 2025' AND c.user_id = 'alice_manager' AND wc.resource_type = 'acl' AND wc.webhook_address = 'https://it.techcorp.com/calendar-watch' AND wc.is_active = 'true' AND JSON_EXTRACT(wc.params, '$.ttl') = '5184000';", "expected_value": 1, "comparison_type": "equals"}}]