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 apply a retention policy to the 'Technical Spec.pdf' file. The file currently has multiple revisions. Version 2 (Technical_Specifications_v2.pdf) is the approved final version. Version 1 (Technical_Specifications_v1.pdf) is an obsolete draft that should be deleted to optimize storage. The file's metadata needs to be updated with retention_policy='enforced' and retention_date='2025-12-02' in the appProperties. Document this policy application with a comment: 'Retention policy applied: v2 preserved permanently, v1 removed per storage optimization requirements.'

Available tools:
update_files
list_revisions
create_comments
list_files
delete_revisions

Verification checks:
[{"verifier_type": "database_state", "name": "verify_revision_deleted", "description": "verify_revision_deleted", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH deleted_check AS (\n  SELECT id\n  FROM revisions\n  WHERE file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND revision_number = 1\n    AND id = '01JBQM3K8TGHZX9RNVQM5Y2P8V'\n)\nSELECT COUNT(*) as count\nFROM deleted_check", "expected_value": 0, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_retention_metadata", "description": "verify_retention_metadata", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH file_metadata AS (\n  SELECT\n    id,\n    name,\n    json_extract(app_properties, '$.retention_policy') as retention_policy,\n    json_extract(app_properties, '$.retention_date') as retention_date\n  FROM files\n  WHERE id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND name = 'Technical Spec.pdf'\n)\nSELECT COUNT(*) as count\nFROM file_metadata\nWHERE retention_policy = 'enforced'\n  AND retention_date = '2025-12-02'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_retention_comment", "description": "verify_retention_comment", "gym_name": "gym-google-drive-mcp", "validation_config": {"query": "WITH retention_comment AS (\n  SELECT id, file_id, content, deleted\n  FROM comments\n  WHERE file_id = '01JBQM3K8TGHZX9RNVQM5Y2P8R'\n    AND deleted = 0\n    AND LOWER(content) LIKE '%retention policy applied%'\n    AND LOWER(content) LIKE '%v2 preserved permanently%'\n    AND LOWER(content) LIKE '%v1 removed%'\n)\nSELECT COUNT(*) as count\nFROM retention_comment", "expected_value": 1, "comparison_type": "equals"}}]