Domain: drive

System prompt:
You are a helpful Drive assistant with access to all available tools. 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:
We need to clean up the revision history on the Financials Q1 PDF to prepare it for client handoff. Find the Financials Q1.pdf file in the Marketing Analytics shared drive and review all its revisions. For any revision that is not marked as "keep forever", I need you to delete it since we only want to retain critical milestones. Then check if the most recent revision is set to keep forever - if it is not, update it so the latest version is permanently preserved. After managing the revisions, go through all the comments on the document and find any that are marked as resolved. For each resolved comment, add a reply saying "Archived during revision cleanup" so we have a record of when they were addressed. Once that is done, create a summary document called "Financials Q1 - Revision Cleanup Report" that lists how many revisions were deleted, confirms the latest revision is preserved, and shows how many resolved comments were archived. Finally, share this cleanup report with Emily Williams at _emily_williams@ibm.com giving her reader access so she can review what was cleaned up before client handoff.

Available tools:
list_comments
update_revisions
list_files
list_revisions
create_file
create_permission
list_drives
delete_revisions
create_replies

Verification checks:
[{"verifier_type": "database_state", "name": "Non-Critical Revision Deleted", "description": "Verifies that Non-Critical Revision Deleted", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as non_critical_deleted FROM revisions \nWHERE file_id = 'EE6B6546C3ED4B9EB494D6213D' \nAND id = 'E39C77302D48482481C0BA3BAF';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Latest Revision Preserved with Keep Forever", "description": "Verifies that Latest Revision Preserved with Keep Forever", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as latest_preserved FROM revisions \nWHERE file_id = 'EE6B6546C3ED4B9EB494D6213D' \nAND id = 'CE906E0F4D2042DC8C59AA77CA' \nAND keep_forever = true;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Archival Reply Added to Resolved Comment", "description": "Verifies that Archival Reply Added to Resolved Comment", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as archival_reply FROM replies r \nWHERE r.comment_id = '7E8B33EB9F4C466FBA49DBD1F1' \nAND r.author_id = 'f02ee00317514b48960ff00c46' \nAND r.content LIKE '%Archived during revision cleanup%' \nAND r.deleted = false;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Cleanup Report Document Created", "description": "Verifies that Cleanup Report Document Created", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as report_count FROM files \nWHERE name = 'Financials Q1 - Revision Cleanup Report' \nAND (\n    mime_type = 'application/vnd.google-apps.document' \n    OR mime_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n) \nAND trashed = false;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Cleanup Report Has Content", "description": "Verifies that Cleanup Report Has Content", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as report_content FROM files \nWHERE name = 'Financials Q1 - Revision Cleanup Report' \nAND (description IS NOT NULL OR properties IS NOT NULL);", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Emily Williams Has Reader Access to Report", "description": "Verifies that Emily Williams Has Reader Access to Report", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as emily_permission FROM permissions p \nJOIN files f ON p.file_id = f.id \nWHERE f.name = 'Financials Q1 - Revision Cleanup Report' \nAND p.email_address = '_emily_williams@ibm.com' \nAND p.role = 'reader';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "File Is in Marketing Analytics Drive", "description": "Verifies that File Is in Marketing Analytics Drive", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) as file_in_drive FROM files \nWHERE id = 'EE6B6546C3ED4B9EB494D6213D' \nAND drive_id = '7574CD3555BB41A4B2A84E2048';", "expected_value": 1, "comparison_type": "equals"}}]