FoyerDevelopers

Generated · Live registry

ai tools

10 tools in this domain, generated from the running registry.

All tool domains

ai.acceptDraft

writesconfirm

Accept an AI-drafted reply and deliver it to the guest now. This is a real guest-facing send over the booking channel. Requires confirmation.

Input parameters

FieldTypeRequiredNotes
draftIdstringyes
bodyOverridestringno

Output fields

FieldTypeRequiredNotes
messageIdstringyes
deliveredbooleanyes
rechnungsmailenumnoOne of: gesendet, gesperrt, keine
gesperrtSeitstring · nullableno

ai.antwortModus

read-only

Reads the AI reply switch (off, suggestions only, on) and whether AI replies are enabled for the property. Owner only. Read-only query.

Input parameters

Returns object.

Output fields

FieldTypeRequiredNotes
modusenumyesOne of: aus, vorschlag, an
mistralBereitbooleanyes

ai.discard_draft

writes

Discard an AI-generated draft reply. Deletes the draft message and logs the discard for trust-ramp acceptance-rate accounting.

Input parameters

FieldTypeRequiredNotes
draftIdstringyes

Output fields

FieldTypeRequiredNotes
okliteralyesOne of: true

ai.kiVersandStoppen

writes

“Stop” on an AI suggestion during the recall window: the scheduled automatic send is cancelled and the draft stays as a suggestion. The inbox also calls it on the first keystroke in the draft. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
draftIdstringyes

Output fields

FieldTypeRequiredNotes
gestopptbooleanyestrue, wenn ein geplanter Versand gestoppt wurde; false, wenn keiner (mehr) geplant war.

ai.latestDraftForConversation

read-only

Latest draft (AI suggestion) for a conversation, if any. The suggestion-card component fetches this on every drill-down render + after the SSE-driven cache invalidation. Read-only query.

Input parameters

FieldTypeRequiredNotes
conversationIdstringyes

Output fields

The whole object may be null.

FieldTypeRequiredNotes
idstringyes
tenantIdstringyes
conversationIdstringyes
channelenumyesOne of: whatsapp, email, hospitable, voice, channex, beds24
directionenumyesOne of: inbound, outbound
senderstring · nullableyes
bodystring · nullableyes
languageDetectedstring · nullableyes
aiLayerenum · nullableyesOne of: rule, llm, manual, escalated, auto_received
aiConfidencestring · nullableyesDecimal as string — numeric column, not an IEEE-754 double
aiReplyToMessageIdstring · nullableyes
attachmentUrlstring · nullableyes
attachmentKindenum · nullableyesOne of: audio, image, file
externalMessageIdstring · nullableyes
sentReferenceIdstring · nullableyes
senderUseranyyesHospitable host account that sent this message ({id,email,name}), stored verbatim in an untyped JSONB column — no Drizzle `$type<>()`, so no fixed shape.
externalThreadRefsarray of string · nullableyes
subjectstring · nullableyes
bodyHtmlstring · nullableyes
stateenumyesOne of: draft, sent
sentAtstringyes
providerNamestring · nullableyes
providerSourcestring · nullableyes
deliveryStatusenumyesOne of: queued, sent, beobachtet, provider_acked, delivered, read, failed, sync_unknown
lastReconciledAtstring · nullableyes
providerStatusRawanyyesLast raw provider status payload, kept for debugging only — an untyped JSONB column whose shape is whatever the provider sent.
invoiceRequestedbooleanyes
autoversandFehlerstring · nullableno
hatRechnungsabsichtbooleanno
kiGrundstring · nullableno
kiSendenAbstring · nullableno

ai.metrics

read-only

AI dashboard data for the tenant: current mode (suggest/auto), 7-day acceptance metrics, auto-mode eligibility, current-month spend, and the last 50 invocations, plus this month's model calls per purpose and model (calls, tokens, list-price cost in cents). Read-only.

Input parameters

Returns object.

Output fields

FieldTypeRequiredNotes
currentModeenumyesOne of: suggest, auto
acceptanceobjectyes
acceptance.windowDaysnumberyes
acceptance.draftednumberyes
acceptance.discardednumberyes
acceptance.autoSentnumberyes
acceptance.acceptanceRatenumberyes
eligibilityobjectyes
eligibility.eligiblebooleanyes
eligibility.daysSinceFirstDraftnumberyes
eligibility.acceptanceRatenumberyes
eligibility.draftednumberyes
eligibility.reasonstring · nullableyes
spendobjectyes
spend.costEurCentsnumberyes
spend.inputTokensnumberyes
spend.outputTokensnumberyes
spend.budgetCapCentsnumber · nullableyes
invocationsarray of objectyes
invocations.idstringyes
invocations.channelstringyes
invocations.aiLayerstring · nullableyes
invocations.aiConfidencestring · nullableyes
invocations.statestringyes
invocations.bodystring · nullableyes
invocations.conversationIdstringyes
invocations.sentAtstringyes
aufrufearray of objectyes
aufrufe.anbieterstringyes
aufrufe.modellstringyes
aufrufe.zweckstring · nullableyes
aufrufe.aufrufenumberyes
aufrufe.eingabenumberyes
aufrufe.ausgabenumberyes
aufrufe.kostenCentnumberyes

ai.previewVoiceStyle

writes

Side-by-side brand-voice preview: composes the same guest message with and without style anchors so the operator can feel the delta before deciding to enable/disable voice training. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
sampleGuestMessagestringyes

Output fields

One of 3 shapes, depending on the outcome:

Shape 1

FieldTypeRequiredNotes
okliteralyesOne of: false
reasonliteralyesOne of: rate_limited

Shape 2

FieldTypeRequiredNotes
okliteralyesOne of: false
reasonliteralyesOne of: not_enough_anchors
requiredintegeryes
currentintegeryes

Shape 3

FieldTypeRequiredNotes
okliteralyesOne of: true
withAnchorsstringyes
withoutAnchorsstringyes
anchorCountintegeryes

ai.setAntwortModus

writes

Changes the AI reply switch: off, suggestions only (drafts) or on (safe answers are sent automatically). Owner only; writes an audit entry with the old and new value. Takes effect only for properties where AI replies are enabled. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
modusenumyesOne of: aus, vorschlag, an

Output fields

FieldTypeRequiredNotes
modusenumyesOne of: aus, vorschlag, an

ai.set_mode

writesconfirm

Flip tenant AI mode between 'suggest' (operator approves each draft) and 'auto' (eligible drafts auto-send). Going to 'auto' requires the trust-ramp gate (7d soak + 5+ drafts + ≥80% acceptance) — server-side re-check; throws on failure. 'auto' -> 'suggest' is always allowed (kill-switch). Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
modeenumyesOne of: suggest, auto

Output fields

FieldTypeRequiredNotes
modeenumyesOne of: suggest, auto

ai.update_draft

writes

Save an edited body for an AI-generated draft reply without sending it. The draft stays a draft; accept it later to deliver the edited text. Errors: draft_not_found, not_a_draft.

Input parameters

FieldTypeRequiredNotes
draftIdstringyes
bodystringyes

Output fields

FieldTypeRequiredNotes
draftIdstringyes