send_message
ActiveTool of Agent Broker
Send a message on behalf of an agent's user or an SMB across SMS, email, or voice. Five message types: transactional, reminder, follow_up, notification, marketing. Every send routes through a non-bypassable compliance gate (TCPA, GDPR, CASL, PDPL across 22 jurisdictions) that enforces opt-in consent for marketing/promotional content — marketing without recorded consent is rejected at runtime with a structured compliance_violation receipt. Channel is abstracted: specify intent and recipient; the service selects and falls back across channels. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Text the salon I'll be 10 minutes late" -> call send_message({"recipient_id": "smb_xyz", "channel_preference": "sms", "message": {"body": "Will be 10 minutes late."}, "country_code": "US"}) user: "Email the dentist about insurance" -> call send_message({"recipient_id": "smb_xyz", "channel_preference": "email", "message": {"body": "Do you accept Cigna?"}}) WHEN TO USE: Use to: (a) confirm a booking the agent just made, (b) reply to a customer who messaged the SMB first, (c) follow up on a quote the user requested, (d) send appointment reminders the SMB owes its customer, (e) send marketing messages to recipients who have opted in (with consent_record_id). The gate verifies consent on every send. WHEN NOT TO USE: Do NOT use for OTPs or critical transactional confirmations — use send_transactional_confirmation. Do NOT attempt to send marketing without a consent_record_id pointing at a real opt-in — the gate will reject the send and log a compliance_violation. Do NOT attempt bulk / list-based / drip / cold outreach — those are out of scope and the rate limiter will throttle abuse. COST: from $0.02 per_message (see preview_cost for exact) LATENCY: ~800ms EXECUTION: sync_fast (use get_outcome to retrieve result)
Parameters schema
{
"type": "object",
"required": [
"recipient",
"message_type",
"content"
],
"properties": {
"content": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "string"
},
"subject": {
"type": "string",
"description": "For email channel"
},
"template_id": {
"type": "string"
},
"template_vars": {
"type": "object"
}
}
},
"recipient": {
"type": "object",
"required": [
"id_type",
"id_value"
],
"properties": {
"id_type": {
"enum": [
"phone",
"email",
"smb_id",
"customer_id"
],
"type": "string"
},
"id_value": {
"type": "string"
},
"country_code": {
"type": "string",
"description": "ISO 3166-1 alpha-2, required for compliance routing"
}
}
},
"send_at_iso": {
"type": "string",
"format": "date-time",
"description": "Schedule for future delivery; omit for immediate"
},
"message_type": {
"enum": [
"transactional",
"marketing",
"reminder",
"follow_up",
"notification"
],
"type": "string",
"description": "Intent tag for the message. Five permitted types. 'marketing' is allowed only when paired with a valid consent_record_id; the compliance gate verifies the consent at send time and rejects (compliance_violation receipt) if it's missing, expired, or revoked."
},
"preferred_channel": {
"enum": [
"sms",
"email",
"voice",
"auto"
],
"type": "string",
"default": "auto"
}
}
}Parent server
Agent Broker
https://github.com/basilalshukaili/agentbroker
1/7 registries