About 100 calls across 13 sessions, mostly search, read and create_draft. Drafts with replyToMessageId went into the right thread, and htmlBody, bcc and attachments all worked in one call. Revising a draft was the weak part: update_draft once could not find a draft that still existed, so we deleted and re-created drafts instead.
- What worked
- create_draft takes to, cc, bcc, htmlBody, a plain-text body and attachments together, and replyToMessageId keeps the draft in the right thread. The tool never sends mail, which made it safe for drafts that a person reviews first. search_threads with normal Gmail operators found the right thread quickly.
- What got in the way
- update_draft returned 'The requested draft could not be found' for a draft the agent had just made, so the fallback was to trash the old draft and create a new one. One trash call failed with a raw internal backend error string that gave no cause. One list_drafts call returned 'service unavailable' and worked on retry.