tasks.addComment
Replies to a task. Mutation — changes data.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
taskId | string | yes | |
text | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | boolean | yes |
tasks.add_photo
Attach a photo (image/jpeg, image/png, image/webp) to a task as completion evidence. Body is base64-encoded. Stored under the tenant's photo bucket; URL returned for embedding in chat. Max 5 MB per photo.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
taskId | string | yes | |
mimeType | enum | yes | One of: image/jpeg, image/png, image/webp |
bytesBase64 | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes |
tasks.assign
Reassign a task to a different worker (or unassign by passing null). Mutating action — the MCP client must include _confirm: true.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
userId | string · nullable | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
tasks.byId
Returns a task (id) with event history and attachments. Work roles see only their own tasks; an unknown or invisible id yields null instead of an error. Any signed-in role. Read-only.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
tenantId | string | yes | |
conversationId | string · nullable | yes | |
messageId | string · nullable | yes | |
stayId | string · nullable | yes | |
room | string · nullable | yes | |
assignedToUserId | string · nullable | yes | |
kind | enum | yes | One of: cleaning, maintenance, delivery, other |
title | string | yes | |
description | string · nullable | yes | |
priority | enum | yes | One of: low, normal, high, urgent |
status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
aiGenerated | boolean | yes | |
aiConfidence | string · nullable | yes | Decimal as string — numeric column, not an IEEE-754 double |
summaryTranslations | object | yes | |
dueAt | string · nullable | yes | |
createdByUserId | string · nullable | yes | |
createdAt | string | yes | |
updatedAt | string | yes | |
completedAt | string · nullable | yes | |
events | array of object | yes | |
events.id | string | yes | |
events.taskId | string | yes | |
events.kind | enum | yes | One of: created, assigned, status_changed, comment, photo_added, reassigned |
events.actorUserId | string · nullable | yes | |
events.createdAt | string | yes | |
attachments | array of object | yes | |
attachments.id | string | yes | |
attachments.taskId | string | yes | |
attachments.kind | enum | yes | One of: photo, document, guest_photo |
attachments.url | string | yes | |
attachments.mimeType | string · nullable | yes | |
attachments.sizeBytes | integer · nullable | yes | |
attachments.uploadedByUserId | string · nullable | yes | |
attachments.createdAt | string | yes |
tasks.calendarGrid
Hospitable-style 2D calendar feed: rooms × dates with task pills. UI consumer: /operations/calendar/tasks (Phase 5). Two RLS-scoped SELECTs (rooms, tasks-in-range). Caller buckets by (room.name, dueAt) since `tasks.room` is varchar, not a FK. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | |
to | string | yes | |
roomIds | array of string | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
rooms | array of object | yes | |
rooms.id | string | yes | |
rooms.name | string | yes | |
tasks | array of object | yes | |
tasks.id | string | yes | |
tasks.title | string | yes | |
tasks.room | string · nullable | yes | |
tasks.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
tasks.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
tasks.priority | enum | yes | One of: low, normal, high, urgent |
tasks.dueAt | string · nullable | yes | |
tasks.assignedToUserId | string · nullable | yes | |
from | string | yes | |
to | string | yes |
tasks.comments
Reads a task's thread: the return channel to the damage report. The cleaner reports via their link (`reinigung.meldeSchaden`); without these two procedures there would be no reply, only a filing. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
taskId | string | yes |
Output fields
Returns array of object. Fields of each element:
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
text | string | yes | |
von | string · nullable | yes | |
eigener | boolean | yes | |
createdAt | any | yes |
tasks.counts
Dashboard tab counts. RLS scopes to current tenant. Buckets: - needsAction: unassigned & open - inProgress: assigned or in_progress - upcoming: open/assigned/in_progress with due_at in next 7d - past: done/cancelled OR overdue active rows. Read-only query.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
needsAction | integer | yes | |
inProgress | integer | yes | |
upcoming | integer | yes | |
past | integer | yes |
tasks.create
Create a manual task. Mirrors the operator UI's manual-create form. If assignedToUserId is set, status starts at 'assigned'; otherwise 'open'. Optional dueAt (ISO timestamp with time zone, e.g. 2026-10-21T16:00:00+02:00) sets the due date; without it the task has none and shows under „Heute“ until done.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
kind | enum | yes | One of: cleaning, maintenance, delivery, other |
title | string | yes | |
description | string | no | |
priority | enum | no | One of: low, normal, high, urgent — Default: "normal" |
room | string | no | |
assignedToUserId | string | no | |
dueAt | string | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
tasks.get
Get a single task with its full event timeline and photo/document attachments. Returns null if the task doesn't exist or isn't visible to the key (housekeeping/maintenance-scoped keys see no tasks — keys have no user).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
task | object | yes | |
task.id | string | yes | |
task.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
task.title | string | yes | |
task.description | string · nullable | yes | |
task.priority | enum | yes | One of: low, normal, high, urgent |
task.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
task.room | string · nullable | yes | |
task.assignedToUserId | string · nullable | yes | |
task.aiGenerated | boolean | yes | |
task.conversationId | string · nullable | yes | |
task.messageId | string · nullable | yes | |
task.stayId | string · nullable | yes | |
task.createdAt | string | yes | |
task.updatedAt | string | yes | |
task.completedAt | string · nullable | yes | |
events | array of object | yes | |
events.id | string | yes | |
events.kind | string | yes | |
events.actorUserId | string · nullable | yes | |
events.payload | any | yes | |
events.createdAt | string | yes | |
attachments | array of object | yes | |
attachments.id | string | yes | |
attachments.kind | string | yes | |
attachments.url | string | yes | |
attachments.mimeType | string · nullable | yes | |
attachments.sizeBytes | number · nullable | yes | |
attachments.uploadedByUserId | string · nullable | yes | |
attachments.createdAt | string | yes |
tasks.historySearch
Cross-stay history search. Matches the query against task titles, stay external_code (e.g. Hospitable confirmation code "HM54KEHW5X"), and stay external_ref. Returns the matched tasks plus any task_rule_executions rows linked to those tasks. Default window is the last 90 days. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
q | string | yes | |
dateFrom | string | no | |
dateTo | string | no | |
page | integer | no | Default: 1 |
pageSize | integer | no | Default: 25 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
tasks | array of object | yes | |
tasks.id | string | yes | |
tasks.title | string | yes | |
tasks.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
tasks.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
tasks.dueAt | string · nullable | yes | |
tasks.completedAt | string · nullable | yes | |
tasks.createdAt | string | yes | |
tasks.room | string · nullable | yes | |
tasks.stayExternalCode | string · nullable | yes | |
tasks.stayExternalRef | string · nullable | yes | |
executions | array of object | yes | |
executions.id | string | yes | |
executions.ruleId | string | yes | |
executions.ruleName | string · nullable | yes | |
executions.triggeredAt | string | yes | |
executions.outcome | enum | yes | One of: task_created, condition_false, no_assignee, rule_disabled_during_eval, error |
executions.taskId | string · nullable | yes | |
page | integer | yes | |
hasMore | boolean | yes |
tasks.listFiltered
List tasks filtered by status, date, assignee, or kind.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
bucket | enum | yes | One of: needsAction, inProgress, upcoming, past |
filters | object | no | Default: {} |
filters.room | string | no | |
filters.assigneeUserId | string | literal | no | |
filters.kind | enum | no | One of: cleaning, maintenance, delivery, other |
filters.search | string | no | |
page | integer | no | Default: 1 |
pageSize | integer | no | Default: 25 |
sort | enum | no | One of: dueAt, createdAt, priority — Default: "dueAt" |
mitFotos | boolean | no | Default: false |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
rows | array of object | yes | |
rows.id | string | yes | |
rows.tenantId | string | yes | |
rows.conversationId | string · nullable | yes | |
rows.messageId | string · nullable | yes | |
rows.stayId | string · nullable | yes | |
rows.room | string · nullable | yes | |
rows.assignedToUserId | string · nullable | yes | |
rows.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
rows.title | string | yes | |
rows.description | string · nullable | yes | |
rows.priority | enum | yes | One of: low, normal, high, urgent |
rows.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
rows.aiGenerated | boolean | yes | |
rows.aiConfidence | string · nullable | yes | Decimal as string — numeric column, not an IEEE-754 double |
rows.summaryTranslations | object | yes | |
rows.dueAt | string · nullable | yes | |
rows.createdByUserId | string · nullable | yes | |
rows.createdAt | string | yes | |
rows.updatedAt | string | yes | |
rows.completedAt | string · nullable | yes | |
rows.fotos | array of object | no | |
page | integer | yes | |
hasMore | boolean | yes |
tasks.listForMe
List tasks assigned to the current (owner) user.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
status | array of enum | no | |
ansicht | enum | no | One of: heute |
Output fields
Returns array of object. Fields of each element:
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
tenantId | string | yes | |
conversationId | string · nullable | yes | |
messageId | string · nullable | yes | |
stayId | string · nullable | yes | |
room | string · nullable | yes | |
assignedToUserId | string · nullable | yes | |
kind | enum | yes | One of: cleaning, maintenance, delivery, other |
title | string | yes | |
description | string · nullable | yes | |
priority | enum | yes | One of: low, normal, high, urgent |
status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
aiGenerated | boolean | yes | |
aiConfidence | string · nullable | yes | Decimal as string — numeric column, not an IEEE-754 double |
summaryTranslations | object | yes | |
dueAt | string · nullable | yes | |
createdByUserId | string · nullable | yes | |
createdAt | string | yes | |
updatedAt | string | yes | |
completedAt | string · nullable | yes |
tasks.list_assignable_users
List tenant members in the housekeeping or maintenance pools — used as context when picking an assignee for a new task. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
users | array of object | yes | |
users.id | string | yes | |
users.name | string · nullable | yes | |
users.role | enum | yes | One of: owner, staff, reception, housekeeping, maintenance |
users.locale | string | yes |
tasks.list_open
List tasks not yet completed (open + assigned + in_progress) across the tenant. Newest-first. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
items.title | string | yes | |
items.description | string · nullable | yes | |
items.priority | enum | yes | One of: low, normal, high, urgent |
items.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
items.room | string · nullable | yes | |
items.assignedToUserId | string · nullable | yes | |
items.aiGenerated | boolean | yes | |
items.conversationId | string · nullable | yes | |
items.messageId | string · nullable | yes | |
items.stayId | string · nullable | yes | |
items.createdAt | string | yes | |
items.updatedAt | string | yes | |
items.completedAt | string · nullable | yes |
tasks.list_unassigned
List open tasks that have no assignee yet. The operator's triage view: what's hanging in the queue. Newest-first. Read-only.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.kind | enum | yes | One of: cleaning, maintenance, delivery, other |
items.title | string | yes | |
items.description | string · nullable | yes | |
items.priority | enum | yes | One of: low, normal, high, urgent |
items.status | enum | yes | One of: open, assigned, in_progress, done, cancelled |
items.room | string · nullable | yes | |
items.assignedToUserId | string · nullable | yes | |
items.aiGenerated | boolean | yes | |
items.conversationId | string · nullable | yes | |
items.messageId | string · nullable | yes | |
items.stayId | string · nullable | yes | |
items.createdAt | string | yes | |
items.updatedAt | string | yes | |
items.completedAt | string · nullable | yes |
tasks.mark_done
Mark a task as done. Sets status='done', completed_at=now, emits the task.completed webhook.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
tasks.reassign
Reassign a task to a different worker. Pass userId=null to move it back to the unassigned pool. Equivalent to tasks.assign — exposed as a separate tool so prompts like 'reassign X to Y' resolve naturally. Mutating action — requires _confirm: true.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
userId | string · nullable | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
tasks.setzeFaelligkeit
Sets or removes the due date of a task (id). `dueAt` is an ISO timestamp with time zone, or `null` (no due date). Operator roles only; the change is recorded in the audit log (`task.faelligkeit_gesetzt`) with old and new value. Mutation — changes data.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
dueAt | string · nullable | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
dueAt | string · nullable | yes |
tasks.updateStatus
Change a task's status (open / in progress / done / etc.).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
status | enum | yes | One of: in_progress, done, cancelled |
Output fields
Response shape not declared.