Send Message
send_messageSends an iMessage via the Mac's Messages.app to a recipient handle (phone number with country code, e.g. +14155551234, or an Apple ID email). This is a write operation: the first call (without confirm) returns a preview; call again with confirm=true to actually send. Direct (1:1) iMessage only — sending into an existing group chat isn't supported yet. Optionally attach files (a photo, a PDF, a vCard) via attachments — each is sent as its own iMessage, in order, before the text. If every attachment fails, the text is not sent either; if some succeed, the text still sends and attachments_failed lists what didn't go through. A send that Messages refuses comes back as an error, not as a result with sent=false. Requires Messages.app signed in to iMessage + Automation permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient handle: phone number with country code (+14155551234) or Apple ID email. | |
| text | Yes | Message body to send. | |
| confirm | No | Set true to actually send. Without it, returns a preview only. | |
| attachments | No | Files to send, as comma-separated absolute paths (e.g. a photo or PDF). Each is sent as a separate iMessage, before the text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| note | No | ||
| sent | No | ||
| text | No | ||
| error | No | ||
| preview | No | ||
| service | No | ||
| attachments | No | ||
| attachments_failed | No |