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. For any tool that supports the 'supportsAllDrives' key, you must include it in the tool request body and set its value to true. A user must have the right privilege to carry out a change on any resource.

Task:
Emily Davis needs to coordinate external access to the 'Employee Handbook.docx' for the annual compliance audit. The pending request from auditor@external.com should be approved with viewing rights only. After approval, grant the actual reader permission to auditor@external.com. John Smith no longer requires his current reader access and it should be removed entirely. Update the document description to "Annual Compliance Audit - Q1 2024 - External Auditor Access Granted". The file needs audit tracking metadata including audit_cycle(Q1_2024), auditor_access(granted), and confidential_review(true). Add a comment documenting the access changes with the text "Compliance audit access configured: auditor@external.com granted viewing access, john.smith@company.com reader access revoked per audit protocol."

Available tools:
create_comments
resolve_accessproposals
update_files
delete_permission
list_comments
list_files
list_permission
list_accessproposals

Verification checks:
[{"verifier_type": "database_state", "name": "John Access Removed", "description": "John Access Removed", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) AS cnt\nFROM permissions p\nINNER JOIN users u ON u.id = p.user_id\nWHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n  AND u.email = 'john.smith@company.com'\n  AND p.role = 'reader';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Access Proposal Approved for External Auditor", "description": "Access Proposal Approved for External Auditor", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH auditor_proposal AS (\n  SELECT\n    id,\n    file_id,\n    requester_email,\n    recipient_email,\n    status,\n    resolved_by_email,\n    resolved_at\n  FROM access_proposals\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2PB5'\n    AND file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n    AND requester_email = 'auditor@external.com'\n)\nSELECT COUNT(*) AS cnt\nFROM auditor_proposal\nWHERE status = 'approved'\n  AND resolved_by_email = 'emily.davis@company.com'\n  AND resolved_at IS NOT NULL;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Auditor Permission Created", "description": "Auditor Permission Created", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH auditor_permission AS (\n  SELECT\n    p.id,\n    p.file_id,\n    p.role,\n    p.type,\n    p.deleted,\n    u.email\n  FROM permissions p\n  INNER JOIN users u ON u.id = p.user_id\n  WHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n    AND u.email = 'auditor@external.com'\n    AND p.role = 'reader'\n    AND p.type = 'user'\n    AND p.deleted = 0\n)\nSELECT COUNT(*) AS cnt\nFROM auditor_permission;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Audit Metadata and Description Updated", "description": "Audit Metadata and Description Updated", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH file_audit_metadata AS (\n  SELECT\n    id,\n    description,\n    properties\n  FROM files\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n)\nSELECT COUNT(*) AS cnt\nFROM file_audit_metadata\nWHERE LOWER(description) LIKE '%annual compliance audit%'\n  AND LOWER(description) LIKE '%q1 2024%'\n  AND LOWER(description) LIKE '%external auditor access granted%'\n  AND json_extract(properties, '$.audit_cycle') = 'Q1_2024'\n  AND json_extract(properties, '$.auditor_access') = 'granted'\n  AND json_extract(properties, '$.confidential_review') = 1;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "John Access Removed", "description": "John Access Removed", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "SELECT COUNT(*) AS cnt\nFROM permissions p\nINNER JOIN users u ON u.id = p.user_id\nWHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n  AND u.email = 'john.smith@company.com'\n  AND p.role = 'reader';", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Access Proposal Approved for External Auditor", "description": "Access Proposal Approved for External Auditor", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH auditor_proposal AS (\n  SELECT\n    id,\n    file_id,\n    requester_email,\n    recipient_email,\n    status,\n    resolved_by_email,\n    resolved_at\n  FROM access_proposals\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2PB5'\n    AND file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n    AND requester_email = 'auditor@external.com'\n)\nSELECT COUNT(*) AS cnt\nFROM auditor_proposal\nWHERE status = 'approved'\n  AND resolved_by_email = 'emily.davis@company.com'\n  AND resolved_at IS NOT NULL;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Auditor Permission Created", "description": "Auditor Permission Created", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH auditor_permission AS (\n  SELECT\n    p.id,\n    p.file_id,\n    p.role,\n    p.type,\n    p.deleted,\n    u.email\n  FROM permissions p\n  INNER JOIN users u ON u.id = p.user_id\n  WHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n    AND u.email = 'auditor@external.com'\n    AND p.role = 'reader'\n    AND p.type = 'user'\n    AND p.deleted = 0\n)\nSELECT COUNT(*) AS cnt\nFROM auditor_permission;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Audit Metadata and Description Updated", "description": "Audit Metadata and Description Updated", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH file_audit_metadata AS (\n  SELECT\n    id,\n    description,\n    properties\n  FROM files\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2P8T'\n)\nSELECT COUNT(*) AS cnt\nFROM file_audit_metadata\nWHERE LOWER(description) LIKE '%annual compliance audit%'\n  AND LOWER(description) LIKE '%q1 2024%'\n  AND LOWER(description) LIKE '%external auditor access granted%'\n  AND json_extract(properties, '$.audit_cycle') = 'Q1_2024'\n  AND json_extract(properties, '$.auditor_access') = 'granted'\n  AND json_extract(properties, '$.confidential_review') = 1;", "expected_value": 1, "comparison_type": "equals"}}]