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 needs to grant writer access on the 'Technical Spec.pdf' file to 'external.user@partner.com' for an external collaboration. For auditing purposes, add a comment to the file stating "Writer access granted to external.user@partner.com for collaborative review". He also needs to update the file's properties to include external_review(true).

Available tools:
create_comments
create_permission
list_files
update_files

Verification checks:
[{"verifier_type": "database_state", "name": "Verify Permission Granted", "description": "Verify Permission Granted", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH user_permission AS (\n    SELECT\n        p.role,\n        p.type,\n        p.deleted\n    FROM\n        permissions p\n    WHERE\n        p.file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n        AND p.user_id = '01JBQM3K8TGHZX9RNVQM5Y2P81A'\n        AND p.type = 'user'\n        AND p.deleted = 0\n)\nSELECT\n    COUNT(*) AS cnt\nFROM\n    user_permission\nWHERE\n    role = 'writer';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify New Comment Added", "description": "Verify New Comment Added", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH new_comment AS (\n    SELECT\n        content,\n        deleted\n    FROM\n        comments\n    WHERE\n        file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n        AND author_id = '01JBQM3K8TGHZX9RNVQM5Y2P7W'\n        AND deleted = 0\n        AND LOWER(content) LIKE '%writer access granted%'\n        AND LOWER(content) LIKE '%external.user@partner.com%'\n        AND LOWER(content) LIKE '%collaborative review%'\n    ORDER BY\n        created_time DESC\n    LIMIT 1\n)\nSELECT\n    COUNT(*) AS cnt\nFROM\n    new_comment;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Verify File Property Updated", "description": "Verify File Property Updated", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH file_property AS (\n    SELECT\n        json_extract(properties, '$.external_review') AS external_review\n    FROM\n        files\n    WHERE\n        id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n)\nSELECT\n    COUNT(*) AS cnt\nFROM\n    file_property\nWHERE\n    external_review = 1;", "expected_value": 1, "comparison_type": "equals"}}]