ingest_message
Ingest one incoming message from an external channel (Beeper network, desktop mail, …) forwarded by the local comms-forward bridge. Idempotent on (channel, external_id). Stores the message and, unless auto_draft is false, generates an AI reply DRAFT (never auto-sends) — EXCEPT when a background agent of this tenant picks up new incoming items itself (run condition inbound_messages.neu / emails.unsortiert): then that agent drafts the reply for approval and no draft is made here. Returns { ingested, message_id, draft_id, auto_draft: 'created'|'skipped_agent_handles'|'disabled'|'empty'|'failed'|'skipped_duplicate', handled_by_agent? }.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel": "<channel>",
"external_id": "<external_id>",
"body": "<body>"
},
"name": "ingest_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Body text | |
| sender | No | Sender handle or ID at the source channel | |
| channel | Yes | Source class, e.g. 'beeper' or 'mail' | |
| chat_id | No | ID of the chat | |
| subject | No | Subject line | |
| agent_id | No | Drafting agent; defaults to the tenant's first enabled agent | |
| metadata | No | Additional source data stored with the message (free-form object) | |
| chat_name | No | Display name of the chat or conversation | |
| auto_draft | No | Draft a reply (default true) | |
| external_id | Yes | Stable per-channel de-dupe id | |
| received_at | No | ISO-8601 timestamp | |
| sender_name | No | Sender display name |