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:
Hello, I need to message bob@company.com, but first, I need to arrange this message a bit. Could you please check if I have a draft directed to him? If I don't create a new draft to him, with subject "Offer Confirmation". Check if I have a label named "Bob", if not, create it with black color. Then apply this label to the draft, but do not send it yet. First, I want to look through it, thank you

Available tools:
create_label
list_labels
create_draft
list_drafts

Verification checks:
[{"verifier_type": "database_state", "name": "Check that new label is created correctly", "description": "Check that new label is created correctly", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from labels where user_id = 'user_001' and name = 'Bob' and color_json->>'backgroundColor' = '#000000'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check that the new draft is created and has a new label", "description": "Check that the new draft is created and has a new label", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from drafts d join messages m on d.message_id = m.id join message_labels ml on ml.message_id = m.id join labels l on l.id = ml.label_id where m.snippet = 'Offer Confirmation' and m.user_id =  'user_001' and l.name = 'Bob'", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "Check that the draft is directed to the bob@company.com with the subject \"Offer Confirmation\"", "description": "Check that the draft is directed to the bob@company.com with the subject \"Offer Confirmation\"", "gym_name": "gym-email-mcp", "validation_config": {"query": "select count(*) from drafts d join messages m on d.message_id = m.id join message_parts mp on m.id = mp.message_id join message_headers mh on mh.message_part_id = mp.id where mh.name = 'To' and mh.value = 'bob@company.com' or mh.name = 'Subject' and mh.value = 'Offer Confirmation'", "expected_value": 2, "comparison_type": "equals"}}]