FoyerDevelopers

Generated · Live registry

ai tools

6 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

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.latestDraftForConversation

read-only

Ai: latest draft for conversation. Read-only query. See the input schema for argument details.

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

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. 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

ai.previewVoiceStyle

writes

Ai: preview voice style. Mutation — changes data. See the input schema for argument details.

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.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