check_compliance
Free, instant pre-flight for the compliance gate. Runs the SAME TCPA / GDPR / CASL / CAN-SPAM / 10DLC gate that send_message and call_business run — but in preview mode, so NO message is sent and NO state changes. Tells you whether a (recipient, channel, message_type, content) send would be permitted BEFORE you pay for it, and if not, names the exact rule and how to remediate. Use it to de-risk a paid send the same way check_booking_link de-risks a paid booking.
EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Is it legal to text this US number a 20%-off promo?" -> call check_compliance({"recipient_id": "+14045550200", "content": "20% off this week only!", "channel": "sms", "message_type": "marketing", "country_code": "US"}) user: "Before you email the dentist, make sure it's allowed" -> call check_compliance({"recipient_id": "office@dentist.example", "content": "Do you accept Cigna? Following up on my request.", "message_type": "follow_up"}) -> then send_message({"recipient": {"id_type": "email", "id_value": "office@dentist.example"}, "message_type": "follow_up", "content": {"body": "Do you accept Cigna? Following up on my request."}})
WHEN TO USE: Call this the moment before send_message or call_business when there is any chance the send is regulated — anything tagged marketing, any SMS to a US number (10DLC), any message to an EU/UK (GDPR) or Canadian (CASL) recipient, or any content you are unsure about. It is free and sub-100ms, so run it as a guard: if legal=true, proceed to send_message with confidence; if legal=false, fix the cited blocker instead of burning a paid, rejected send. WHEN NOT TO USE: Do not treat a legal=true as a permanent license — the gate re-runs at send time, so a fresh opt-out between preview and send still blocks. Do not use it to check two-party voice recording consent (that is evaluated at call time in the voice adapter, not here). It is not a substitute for send_message; it never delivers anything. COST: free - no key required LATENCY: ~15ms
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | Delivery channel. Omit to auto-infer sms/email from recipient_id; set 'voice' explicitly. | |
| content | Yes | The actual message body you intend to send. The gate classifies the real text, so a meaningful preview needs the real content. | |
| state_code | No | US state code (e.g. 'CA') for state-specific rules. | |
| country_code | No | ISO 3166-1 alpha-2 (e.g. 'US', 'DE', 'CA'). Auto-inferred from phone if omitted; drives which jurisdiction rules apply. | |
| message_type | No | Intent tag: transactional, marketing, reminder, follow_up, notification. 'marketing' triggers the consent checks. Defaults to transactional. | transactional |
| recipient_id | Yes | Phone in E.164 (e.g. '+14045550100') or email address the message would go to. |