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:
Please help me organize my existing Sprint Planning event by inviting Adam Anderson (adam.anderson@servicenow.com) as an attendee. Also, grant all current attendees, including Adam, permission to modify the event details directly.

Additionally, remove any attendees who do not have an email address listed, while preserving those who have valid email addresses.

Then, remove any attachments of this event except spreadsheets. To ensure removed attachments are preserved, create a secondary calendar named "Archived Attachments," and within it, set up an event titled "Sprint Planning Attachment Archive" to store these removed attachments securely.

Available tools:
list_events
list_events
patch_event
create_calendar
create_event
patch_event
get_calendar_list
list_events

Verification checks:
[{"verifier_type": "database_state", "name": "Final Attendees", "description": "Verify final attendee set", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT CASE WHEN (SELECT COUNT(*) FROM attendees WHERE event_id = 'event-corrected-001') = 4 AND EXISTS (SELECT 1 FROM attendees WHERE event_id = 'event-corrected-001' AND user_id = 'alice_manager') AND EXISTS (SELECT 1 FROM attendees WHERE event_id = 'event-corrected-001' AND user_id = 'bob_developer') AND EXISTS (SELECT 1 FROM attendees WHERE event_id = 'event-corrected-001' AND user_id = 'carol_designer') AND EXISTS (SELECT 1 FROM attendees WHERE event_id = 'event-corrected-001' AND user_id = 'adam_anderson') THEN 1 ELSE 0 END AS count", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Guests Can Modify", "description": "Verify guestsCanModify enabled", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM events WHERE event_id = 'event-corrected-001' AND guestscanmodify = 1", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Non-Sheets Removed", "description": "Verify non-spreadsheet attachments removed", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM attachments WHERE event_id = 'event-corrected-001' AND file_url NOT LIKE '%spreadsheets%'", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Sheets Retained", "description": "Verify spreadsheet attachments kept", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM attachments WHERE event_id = 'event-corrected-001' AND file_url LIKE '%spreadsheets%'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Archive Calendar", "description": "Verify archive calendar created", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM calendars WHERE user_id = 'alice_manager' AND summary = 'Archived Attachments'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Archive Event", "description": "Verify archive event created", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM events WHERE summary = 'Sprint Planning Attachment Archive' AND calendar_id IN (SELECT calendar_id FROM calendars WHERE user_id = 'alice_manager' AND summary = 'Archived Attachments')", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Attachment Backed Up", "description": "Verify removed attachment stored in archive", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) AS count FROM attachments WHERE event_id IN (SELECT event_id FROM events WHERE summary = 'Sprint Planning Attachment Archive' AND calendar_id IN (SELECT calendar_id FROM calendars WHERE user_id = 'alice_manager' AND summary = 'Archived Attachments')) AND file_url = 'https://drive.google.com/file/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/view'", "expected_value": 1, "comparison_type": "equals"}}]