create_mail_rule so the user can confirm — required practice before any large backfill.
Parameters
Takes the same rule spec ascreate_mail_rule: optional name, match (all/any), conditions, actions, and an optional existingMail policy whose scope (inbox default, or all) decides where matches are counted.
Example
Call
Result
Notes
- An invalid rule is reported in the result text (
Rule is INVALID: …), not as a tool error — the question being asked is “would this work?”. - Counts above the 1000-message query window are reported as
1000+(a lower bound). - Warnings cover actions a backfill would skip (
forward,stopProcessing) and the heuristic nature ofhasAttachmentmatching.