Domain: email

System prompt:
You are a helpful Email 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:
Find an attachment with the name "project_milestone.pdf", check if I have sent this attachment to carol@university.edu, and if not, write a draft from me, to carol@university.edu, with subject: "Project Milestone", and body text: "Hi, here is the file I promised to send you", attach the same file that you will find to the draft. 

Available tools:
get_message
list_messages
get_attachment
create_draft

Verification checks:
[{"verifier_type": "database_state", "name": "Check the receiver of the new draft", "description": "Check the receiver of the new draft", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from message_parts mp join messages m on m.id = mp.message_id join message_headers mh on mh.message_part_id = mp.id where m.snippet = 'Project Milestone' and m.user_id = 'user_001' and mh.name = 'To' and mh.value = 'carol@university.edu'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "is the new attachment created for the relevant new draft message", "description": "is the new attachment created", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from attachments a join messages m on m.id = a.message_id and a.user_id = m.user_id where a.user_id = 'user_001' and m.snippet = 'Project Milestone'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check the name of an attachment of a new draft", "description": "Check the name of an attachment of a new draft", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from message_parts mp join messages m on m.id = mp.message_id join message_headers mh on mh.message_part_id = mp.id where m.snippet = 'Project Milestone' and m.user_id = 'user_001' and mh.value like '%project_milestone.pdf%'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check the receiver of the new draft", "description": "Check the receiver of the new draft", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from message_parts mp join messages m on m.id = mp.message_id join message_headers mh on mh.message_part_id = mp.id where m.snippet = 'Project Milestone' and m.user_id = 'user_001' and mh.name = 'To' and mh.value = 'carol@university.edu'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "is the new attachment created for the relevant new draft message", "description": "is the new attachment created", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from attachments a join messages m on m.id = a.message_id and a.user_id = m.user_id where a.user_id = 'user_001' and m.snippet = 'Project Milestone'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check the name of an attachment of a new draft", "description": "Check the name of an attachment of a new draft", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from message_parts mp join messages m on m.id = mp.message_id join message_headers mh on mh.message_part_id = mp.id where m.snippet = 'Project Milestone' and m.user_id = 'user_001' and mh.value like '%project_milestone.pdf%'", "expected_value": 1, "comparison_type": "equals"}}]