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:
The Engineering Team has been shut down, and Mike Chen (mike.chen@company.com ) has been transferred to the Financial Team (finance@company.com ). Block the Engineering Team’s access to all PDF and word processing document files in the Engineering Projects drive, but ensure that Mike retains read access to all files that the Engineering Team previously had access to . Grant the same read access to his new Financial Team so they can continue collaborating with him.  Enforce stricter controls by requiring writer permission before files can be copied in the drive. Finally, add a security_classification metadata value of "highly_confidential" to reflect the elevated sensitivity of these files.

Available tools:
list_permission
create_permission
delete_permission
list_drives
update_files
update_drives
list_files

Verification checks:
[{"verifier_type": "database_state", "name": "Count of affected files where Engineering Team has no active permission (deleted or non-existent)", "description": "Confirm that engineering Team Access is Blocked", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH engineering_group AS (\n  SELECT id FROM groups WHERE email = 'engineering@company.com'\n),\ndrive_cte AS (\n  SELECT id FROM drives WHERE name = 'Engineering Projects'\n),\naffected_files AS (\n  SELECT f.id\n  FROM files f\n  JOIN drive_cte d ON f.drive_id = d.id\n  WHERE f.mime_type IN (\n    'application/pdf', \n    'application/msword', \n    'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n  )\n  AND f.trashed = 0\n)\nSELECT COUNT(*)\nFROM affected_files af\nWHERE NOT EXISTS (\n  SELECT 1 FROM permissions p\n  WHERE p.file_id = af.id\n  AND p.group_id = (SELECT id FROM engineering_group)\n  AND p.deleted = 0\n);", "expected_value": 2, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Count of affected files where Mike Chen has reader or higher role", "description": "Confirm that Mike Chen retains Read Access", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH mike_user AS (\n  SELECT id FROM users WHERE email = 'mike.chen@company.com'\n),\ndrive_cte AS (\n  SELECT id FROM drives WHERE name = 'Engineering Projects'\n),\naffected_files AS (\n  SELECT f.id\n  FROM files f\n  JOIN drive_cte d ON f.drive_id = d.id\n  WHERE f.mime_type IN (\n    'application/pdf', \n    'application/msword', \n    'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n  )\n  AND f.trashed = 0\n)\nSELECT COUNT(*)\nFROM affected_files af\nWHERE EXISTS (\n  SELECT 1 FROM permissions p\n  WHERE p.file_id = af.id\n  AND p.user_id = (SELECT id FROM mike_user)\n  AND p.role IN ('reader', 'writer', 'owner')\n  AND p.deleted = 0\n);", "expected_value": 2, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Count of affected files where Financial Team has reader role", "description": "Confirm that Financial Team same read access was granted", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH financial_group AS (\n  SELECT id FROM groups WHERE email = 'finance@company.com'\n),\ndrive_cte AS (\n  SELECT id FROM drives WHERE name = 'Engineering Projects'\n),\naffected_files AS (\n  SELECT f.id\n  FROM files f\n  JOIN drive_cte d ON f.drive_id = d.id\n  WHERE f.mime_type IN (\n    'application/pdf', \n    'application/msword', \n    'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n  )\n  AND f.trashed = 0\n)\nSELECT COUNT(*)\nFROM affected_files af\nWHERE EXISTS (\n  SELECT 1 FROM permissions p\n  WHERE p.file_id = af.id\n  AND p.group_id = (SELECT id FROM financial_group)\n  AND p.role = 'reader'\n  AND p.deleted = 0\n);", "expected_value": 2, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Count of affected files with security_classification set to highly_confidential", "description": "Confirm that Security Classification metadata was Updated and pre-existing attributes were not overwritten", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH drive_cte AS (\n  SELECT id FROM drives WHERE name = 'Engineering Projects'\n),\naffected_files AS (\n  SELECT f.id\n  FROM files f\n  JOIN drive_cte d ON f.drive_id = d.id\n  WHERE f.mime_type IN (\n    'application/pdf', \n    'application/msword', \n    'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n  )\n  AND f.trashed = 0\n)\nSELECT COUNT(*)\nFROM affected_files af\nJOIN files f ON f.id = af.id\nWHERE json_extract(f.properties, '$.security_classification') = 'highly_confidential';\n", "expected_value": 2, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Copy requires writer permission", "description": "Confirm if writer permission is enforced to copy", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH drive_cte AS (\n  SELECT id FROM drives WHERE name = 'Engineering Projects' and id = '01JBQM3K8TGHZX9RNVQM5Y2P8B' and copy_requires_writer_permission = 1\n)\nSELECT COUNT(*)\nfrom drive_cte;", "expected_value": 1, "comparison_type": "equals"}}]