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:
John Smith needs to finalize the 'Technical Spec.pdf' for Q1 release approval. Update the document's application specific file metadata to include status(approved) and release_version(2.0) for version control tracking. Alex Rodriguez requires writer access for implementation work, transitioning from current commenting privileges. The Engineering Team group should no longer have editing permissions to maintain release integrity. Grant the external partner (external.user@partner.com) commenting access for technical review feedback. Address Mike Chen's implementation feedback with a reply stating "Implementation approach documented. API integration details added to section 3 as requested." Document the release approval with a comment containing "Technical Spec v2.0 approved for Q1 release. Access controls updated: Alex elevated to writer for implementation, group editing restricted, external partner granted review access."

Available tools:
list_permission
list_comments
create_permission
update_files
create_replies
update_permission
create_comments
list_files
delete_permission

Verification checks:
[{"verifier_type": "database_state", "name": "Release Metadata Added to File", "description": "Release Metadata Added to File", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH release_file AS (\n  SELECT\n    id,\n    name,\n    app_properties\n  FROM files\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND trashed = 0\n)\nSELECT COUNT(*) AS cnt\nFROM release_file\nWHERE json_extract(app_properties, '$.status') = 'approved'\n  AND json_extract(app_properties, '$.release_version') = '2.0';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Alex Rodriguez Permission Upgraded to Writer", "description": "Alex Rodriguez Permission Upgraded to Writer", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH alex_user AS (\n  SELECT id\n  FROM users\n  WHERE email = 'alex.rodriguez@company.com'\n)\nSELECT COUNT(*) AS cnt\nFROM permissions p\nINNER JOIN alex_user au ON au.id = p.user_id\nWHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n  AND p.role = 'writer'\n  AND p.type = 'user'\n  AND p.deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Engineering Team Group Permission Removed", "description": "Engineering Team Group Permission Removed", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH engineering_group AS (\n  SELECT id\n  FROM groups\n  WHERE email = 'engineering@company.com'\n)\nSELECT COUNT(*) AS cnt\nFROM permissions p\nINNER JOIN engineering_group eg ON eg.id = p.group_id\nWHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n  AND p.type = 'group'\n  AND p.deleted = 1;", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "External Partner Granted Commenter Access", "description": "External Partner Granted Commenter Access", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH partner_user AS (\n  SELECT id\n  FROM users\n  WHERE email = 'external.user@partner.com'\n)\nSELECT COUNT(*) AS cnt\nFROM permissions p\nINNER JOIN partner_user pu ON pu.id = p.user_id\nWHERE p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n  AND p.role = 'commenter'\n  AND p.type = 'user'\n  AND p.deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Implementation Feedback Addressed and Release Documented", "description": "Implementation Feedback Addressed and Release Documented", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH mike_comment AS (\n  SELECT id\n  FROM comments\n  WHERE file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND author_id = '01JBQM3K8TGHZX9RNVQM5Y2P7Y'\n    AND LOWER(content) LIKE '%implementation approach%'\n    AND deleted = 0\n),\nfeedback_reply AS (\n  SELECT COUNT(*) AS cnt\n  FROM replies r\n  INNER JOIN mike_comment mc ON mc.id = r.comment_id\n  WHERE r.deleted = 0\n    AND LOWER(r.content) LIKE '%implementation approach documented%'\n    AND LOWER(r.content) LIKE '%api integration details added to section 3%'\n),\nrelease_comment AS (\n  SELECT COUNT(*) AS cnt\n  FROM comments\n  WHERE file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND deleted = 0\n    AND LOWER(content) LIKE '%technical spec v2.0 approved for q1 release%'\n    AND LOWER(content) LIKE '%alex elevated to writer%'\n    AND LOWER(content) LIKE '%external partner granted review access%'\n)\nSELECT\n  CASE\n    WHEN (SELECT cnt FROM feedback_reply) >= 1\n     AND (SELECT cnt FROM release_comment) >= 1\n    THEN 1\n    ELSE 0\n  END AS cnt;", "expected_value": 1, "comparison_type": "equals"}}]