--- id: "8fd5f429-d266-4e0e-ac87-ed1b2183fa17" name: "Slack Reply Drafting" micro_summary: "Use `slack_draft_reply(draft_text, expected_label_contains=...)` to place text in the visible Slack composer without sending; label guard strongly recommended." status: "resolved" see_also: [] scope: "How to prepare Slack replies in the app.slack.com composer without sending, leaving final approval to the user." warnings: "Never click Slack's Send button or toggle thread broadcast controls without explicit user instruction. Draft only and leave final send to the human." --- ## Helper Use `slack_draft_reply(draft_text, expected_label_contains=None, clear_first=True)`. ```python import json result = json.loads(slack_draft_reply( "Draft text for human review", expected_label_contains="Reply to thread in ai", )) ``` ## Parameters - `draft_text`: text to place in the visible Slack composer. - `expected_label_contains`: safety check against the composer aria-label. Use it whenever possible. - `clear_first`: selects existing composer contents before insertion when true. ## Returns JSON with `ok`, composer `label`, final composer `text`, `send_button_present`, and `sent:false`. The helper never clicks Send. ## Guardrail / verification Never call this unless leaving a draft in Slack is intended. 2026-06-01: the mismatch guard was tested with an impossible `expected_label_contains`; it returned `ok=false` and did not insert text. The positive insertion path was tested against a temporary synthetic visible composer element that was removed immediately; it returned `ok=true`, inserted the expected text, and `sent=false` without touching a real Slack composer.