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:
IT needs to review the "Marketing Presentation" in the "Marketing Resources" drive, checking for anomalies that may indicate issues with the file. Confirm that the file is smaller than 5 KB (indicating corruption) and remove any shortcuts that point to it across all drives. Make sure that only the owner can interact with the file. Create an "Integrity Reports" folder in the same drive and place a file named Marketing_Presentation_Integrity_Report.txt inside. On this report file, leave a note for IT management highlighting any issues and any permissions changes, including relevant emails or domains ensuring that the IT head (mike.chen@company.com) can read it.

Available tools:
list_drives
create_comments
create_permission
delete_files
list_files
create_file
delete_permission
list_permission

Verification checks:
[{"verifier_type": "database_state", "name": "Count shortcut files pointing to the \"Marketing Presentation\" file ID have been deleted", "description": "This verifies that shortcuts were identified and deleted across all drives.", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) AS shortcuts_deleted\nFROM files\nWHERE is_shortcut = 1\n  AND trashed = 1\n  AND shortcut_target_id IN (\n    SELECT id\n    FROM files\n    WHERE name = 'Marketing Presentation'\n  );", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check if permissions on \"Marketing Presentation\" file have been revoked for all users except the owner", "description": "Return 1 if only owner has access, return number of permissions otherwise", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH marketing_presentation AS (\n    SELECT id\n    FROM files\n    WHERE name = 'Marketing Presentation'\n),\nfile_permissions AS (\n    SELECT p.id, p.role, p.email_address, p.deleted\n    FROM permissions p\n    WHERE p.file_id IN (SELECT id FROM marketing_presentation) AND p.deleted = 0\n)\nSELECT COUNT(*) as remaining_permissions\nFROM file_permissions;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check if \"Integrity Reports\" folder was created in the same drive as \"Marketing Presentation\"", "description": "This verifies that the folder was created in the correct drive. Returns 1 (if the folder exists in the correct drive, 0 otherwise)", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH marketing_presentation AS (\n    SELECT drive_id\n    FROM files\n    WHERE name = 'Marketing Presentation'\n),\nintegrity_reports AS (\n    SELECT COUNT(*) AS folder_count\n    FROM files f\n    WHERE f.name = 'Integrity Reports' AND f.mime_type = 'application/vnd.google-apps.folder' AND f.drive_id IN (SELECT drive_id FROM marketing_presentation)\n)\nSELECT folder_count\nFROM integrity_reports;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check if the integrity report file \"Marketing_Presentation_Integrity_Report.txt\" was created in the \"Integrity Reports\" folder", "description": "Returns 1 if the report file exists in the Integrity Reports folder, 0 otherwise", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH integrity_reports AS ( SELECT id FROM files WHERE name = 'Integrity Reports' AND mime_type = 'application/vnd.google-apps.folder' ), report_file AS ( SELECT COUNT(*) AS file_count FROM files f WHERE f.name = 'Marketing_Presentation_Integrity_Report.txt' AND f.mime_type = 'text/plain' AND EXISTS ( SELECT 1 FROM integrity_reports ir, json_each(f.parent_ids) je WHERE je.value = CAST(ir.id AS TEXT) ) ) SELECT file_count FROM report_file;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "This verifies that a comment was added to the report file and it mentions the email: john.smith@company.com and the domain: company.com", "description": "Returns 1 if a relevant comment exists on the report file, 0 otherwise", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH report_file AS ( SELECT id FROM files WHERE name = 'Marketing_Presentation_Integrity_Report.txt' AND mime_type = 'text/plain' AND COALESCE(trashed, 0) = 0 ), mike_permissions AS ( SELECT COUNT(*) AS permission_count FROM permissions p JOIN users u ON u.id = p.user_id WHERE p.file_id IN (SELECT id FROM report_file) AND COALESCE(p.deleted, 0) = 0 AND p.role IN ('reader', 'writer', 'owner') AND LOWER(TRIM(u.email)) = 'mike.chen@company.com' ) SELECT permission_count FROM mike_permissions;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check if mike.chen@company.com has read permission on the integrity report file", "description": "Returns 1 if mike.chen@company.com has read or higher permission on the report file, 0 otherwise", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH report_file AS (\n    SELECT id\n    FROM files\n    WHERE name = 'Marketing_Presentation_Integrity_Report.txt'\n      AND mime_type = 'text/plain'\n      AND COALESCE(trashed, 0) = 0\n),\nmike_permissions AS (\n    SELECT COUNT(*) AS permission_count\n    FROM permissions p\n    JOIN users u ON u.id = p.user_id\n    WHERE p.file_id IN (SELECT id FROM report_file)\n      AND COALESCE(p.deleted, 0) = 0\n      AND p.role IN ('reader', 'writer', 'owner')\n      AND LOWER(TRIM(u.email)) = 'mike.chen@company.com'\n)\nSELECT permission_count\nFROM mike_permissions;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check if a comment was created on the integrity report file outlining failure messages due to permission restrictions", "description": "This verifies that the create_comments tool call successfully added a comment with the failure messages.", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH report_file AS ( SELECT id FROM files WHERE name = 'Marketing_Presentation_Integrity_Report.txt' AND mime_type = 'text/plain' ), comments_on_report AS ( SELECT COUNT(*) AS comment_count FROM comments c WHERE c.file_id IN (SELECT id FROM report_file) ) SELECT comment_count FROM comments_on_report;", "expected_value": 1, "comparison_type": "equals"}}]