Dreamlit is an MCP server published by ai.dreamlit, hosted at mcp.dreamlit.ai. When last checked on 2026-11-24 it was working: it answers and lists its tools. It declares 24 tools, including check_compatibility, get_status, get_setup_status, update_project, get_app_context_request.
Create, test, publish, and manage Dreamlit notification workflows from AI clients.
Nothing else in the archive shares these values.
Read-only, unless contactEmail is given (side effect: saves the email so Dreamlit can tell them when their database works). Works without signing in. Use before setting up Dreamlit when you're not sure the app's database fits: pass the database engine (and host if known) read from the repo. Returns verdict compatible, not_yet or unknown, with the reason and what would have to change. On not_yet, tell the user why; if they want to hear when it works, ask for their email and call again with contactEmail. Do not send connection strings or other secrets.
| Parameter | Type | Description |
|---|---|---|
| host | string | Where the database is hosted, if known, e.g. "supabase", "neon", "rds", "planetscale", "lovable-cloud". |
| database * | string | The database engine the app uses, e.g. "postgres", "mysql", "mongodb", "sqlite", "firestore". Read it from the ORM config, dependencies or the database URL scheme; never send the URL itself. |
None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
| framework | string | The app framework, if known, e.g. "nextjs". |
| contactEmail | string | Only when the answer is not_yet and the user asked to hear when it works: their email. Ask the user; don't guess it. |
{
"name": "check_compatibility",
"title": "Check compatibility",
"description": "Read-only, unless contactEmail is given (side effect: saves the email so Dreamlit can tell them when their database works). Works without signing in. Use before setting up Dreamlit when you're not sure the app's database fits: pass the database engine (and host if known) read from the repo. Returns verdict compatible, not_yet or unknown, with the reason and what would have to change. On not_yet, tell the user why; if they want to hear when it works, ask for their email and call again with contactEmail. Do not send connection strings or other secrets.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"database"
],
"properties": {
"host": {
"type": "string",
"maxLength": 60,
"description": "Where the database is hosted, if known, e.g. \"supabase\", \"neon\", \"rds\", \"planetscale\", \"lovable-cloud\"."
},
"database": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"description": "The database engine the app uses, e.g. \"postgres\", \"mysql\", \"mongodb\", \"sqlite\", \"firestore\". Read it from the ORM config, dependencies or the database URL scheme; never send the URL itself."
},
"framework": {
"type": "string",
"maxLength": 60,
"description": "The app framework, if known, e.g. \"nextjs\"."
},
"contactEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 254,
"description": "Only when the answer is not_yet and the user asked to hear when it works: their email. Ask the user; don't guess it."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Check compatibility",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Works before sign-in: then it says the user isn't signed in and how to sign in. Use first when the agent needs Dreamlit product guidance, prompting guidance, approved workspace context, project setup, schema hints, workflow state, or relevant app URLs. Returns a compact context pack with concepts, recommended tool flow, actor/workspace/project data, optional authoring context, optional workflow context, and appUrls. Workflow summaries include liveStatus, and broadcasts include an authoritative broadcast.state. Database tables that Dreamlit can see but not read rows from (row level security with no policy for Dreamlit) carry a warning and fixSql; run fixSql, or ask the user to run it, in the Supabase SQL editor. If Dreamlit couldn't read a connection's tables, that connection has tablesError instead of an empty list meaning no tables. Do not use this to create, update, publish, or unpublish workflows.
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Optional project id. Include it to return project setup, schema hints, and authoring context. |
| workflowId | string | Optional workflow id. Include it to return concise workflow state and preview URL. |
{
"name": "get_status",
"title": "Get status",
"description": "Read-only. Works before sign-in: then it says the user isn't signed in and how to sign in. Use first when the agent needs Dreamlit product guidance, prompting guidance, approved workspace context, project setup, schema hints, workflow state, or relevant app URLs. Returns a compact context pack with concepts, recommended tool flow, actor/workspace/project data, optional authoring context, optional workflow context, and appUrls. Workflow summaries include liveStatus, and broadcasts include an authoritative broadcast.state. Database tables that Dreamlit can see but not read rows from (row level security with no policy for Dreamlit) carry a warning and fixSql; run fixSql, or ask the user to run it, in the Supabase SQL editor. If Dreamlit couldn't read a connection's tables, that connection has tablesError instead of an empty list meaning no tables. Do not use this to create, update, publish, or unpublish workflows.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Include it to return project setup, schema hints, and authoring context."
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional workflow id. Include it to return concise workflow state and preview URL."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get status",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use for a new user or a project that hasn't finished setup. Setup ends when the trial (if needed), app context, product goals and database are ready; building a workflow is a later offer. Returns each setup step with its status, the next required step, whether that step needs the person, the single agent setup page link (the database step asks them to connect there), and contextBrief: questions about the project still open, with where to look for each answer. Call again after the person finishes a step. Do not use for workflow authoring context; use get_status for that.
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Optional project id. Omit it when the workspace has one project. |
{
"name": "get_setup_status",
"title": "Get setup status",
"description": "Read-only. Use for a new user or a project that hasn't finished setup. Setup ends when the trial (if needed), app context, product goals and database are ready; building a workflow is a later offer. Returns each setup step with its status, the next required step, whether that step needs the person, the single agent setup page link (the database step asks them to connect there), and contextBrief: questions about the project still open, with where to look for each answer. Call again after the person finishes a step. Do not use for workflow authoring context; use get_status for that.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get setup status",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Side effect: saves project details. Use right after sign-in, filling in what you already know from the repo (or, when the repo has a recent lifecycle-email-audit/context.json, sending its update_project object): app name, what the product does, which emails it should send, website, and stack. Also answer the brief (goal, what's happening now, who counts, other senders) from the repo, schema and your other tools, marking each answer inferred or confirmed. Check gitignored env files such as .env and .env.local too (git ls-files doesn't list them), but never send their values. Tell the user what you shared and what you assumed. Returns the saved details, answers kept because the person already confirmed them, the questions still open, and the next setup step. Do not send secrets, credentials, customer rows, or end-user data.
| Parameter | Type | Description |
|---|---|---|
| name | string | The app or product name, for example from package.json or the README. |
| brief | object | Answer from the repo, schema and your other tools first; a good guess with evidence is better than a question. Ask the person only what you can't find, in one message. Never send secrets, customer rows or personal data: send summaries, column names and counts. |
| context | object | What you learned about the app from the repo. Never include secrets or user data. |
| projectId | string | Optional project id. Omit it when the workspace has one project. |
| websiteUrl | string | The product website, if known. |
| intendedUseCase | string | Which emails the app should send, for example welcome, receipts, or a weekly digest. |
| companyDescription | string | What the product does and who uses it, in a sentence or two. |
{
"name": "update_project",
"title": "Update project",
"description": "Side effect: saves project details. Use right after sign-in, filling in what you already know from the repo (or, when the repo has a recent lifecycle-email-audit/context.json, sending its update_project object): app name, what the product does, which emails it should send, website, and stack. Also answer the brief (goal, what's happening now, who counts, other senders) from the repo, schema and your other tools, marking each answer inferred or confirmed. Check gitignored env files such as .env and .env.local too (git ls-files doesn't list them), but never send their values. Tell the user what you shared and what you assumed. Returns the saved details, answers kept because the person already confirmed them, the questions still open, and the next setup step. Do not send secrets, credentials, customer rows, or end-user data.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"name": {
"type": "string",
"maxLength": 80,
"minLength": 1,
"description": "The app or product name, for example from package.json or the README."
},
"brief": {
"type": "object",
"properties": {
"segments": {
"type": "object",
"required": [
"source"
],
"properties": {
"value": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "The answer, in a sentence or two. Leave it out when source is unknown."
},
"source": {
"enum": [
"inferred",
"confirmed",
"unknown"
],
"type": "string",
"description": "inferred: you worked it out from code, data or your tools. confirmed: the person said so in this conversation. unknown: you looked and asked, and nobody knows."
},
"evidence": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Where you found it, for example 'profiles.utm_source column' or 'resend in lib/email.ts'."
}
},
"description": "Which customers or leads count, and which are noise? Look first: Find lead-source, UTM, plan, role and 'how did you hear about us' columns, and count people per value. Send column names and counts only, never rows. Ask the person only for: Which groups count and which are noise."
},
"goalMetric": {
"type": "object",
"required": [
"source"
],
"properties": {
"value": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "The answer, in a sentence or two. Leave it out when source is unknown."
},
"source": {
"enum": [
"inferred",
"confirmed",
"unknown"
],
"type": "string",
"description": "inferred: you worked it out from code, data or your tools. confirmed: the person said so in this conversation. unknown: you looked and asked, and nobody knows."
},
"evidence": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Where you found it, for example 'profiles.utm_source column' or 'resend in lib/email.ts'."
}
},
"description": "What's the one number these emails should move, and how is it counted? Look first: Propose one from the code: checkout or subscription tables, Stripe or billing code, activation events. Use your other tools (Stripe, analytics) read-only if you have them. Ask the person only for: Whether your proposed metric is the right one."
},
"otherSenders": {
"type": "object",
"required": [
"source"
],
"properties": {
"value": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "The answer, in a sentence or two. Leave it out when source is unknown."
},
"source": {
"enum": [
"inferred",
"confirmed",
"unknown"
],
"type": "string",
"description": "inferred: you worked it out from code, data or your tools. confirmed: the person said so in this conversation. unknown: you looked and asked, and nobody knows."
},
"evidence": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Where you found it, for example 'profiles.utm_source column' or 'resend in lib/email.ts'."
}
},
"description": "Does anything else email these people? A CRM, other email code, personal follow-ups. Look first: Search the repo for email libraries and services (Resend, SendGrid, Postmark, Nodemailer, AWS SES, Customer.io, HubSpot, Mailchimp, Keap), plus webhooks and Zapier. Ask the person only for: Senders outside the code, such as a CRM or personal follow-ups."
},
"currentMoment": {
"type": "object",
"required": [
"source"
],
"properties": {
"value": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "The answer, in a sentence or two. Leave it out when source is unknown."
},
"source": {
"enum": [
"inferred",
"confirmed",
"unknown"
],
"type": "string",
"description": "inferred: you worked it out from code, data or your tools. confirmed: the person said so in this conversation. unknown: you looked and asked, and nobody knows."
},
"evidence": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "Where you found it, for example 'profiles.utm_source column' or 'resend in lib/email.ts'."
}
},
"description": "What just happened, and what's coming up? Launches, promos, peak season. Look first: Check recent broadcasts (list_workflows, get_analytics), recent commits, the changelog, promo codes and feature flags. Ask the person only for: Plans that aren't in the code yet, such as the next launch or promo."
}
},
"description": "Answer from the repo, schema and your other tools first; a good guess with evidence is better than a question. Ask the person only what you can't find, in one message. Never send secrets, customer rows or personal data: send summaries, column names and counts."
},
"context": {
"type": "object",
"properties": {
"stack": {
"type": "array",
"items": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"maxItems": 20,
"description": "Frameworks and services, for example Next.js, Supabase Auth."
},
"appType": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"description": "For example SaaS, marketplace, ecommerce, internal tool."
},
"triggerTables": {
"type": "array",
"items": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"maxItems": 20,
"description": "Tables whose new or changed rows could start emails, for example profiles or orders."
},
"currentEmailProvider": {
"type": "string",
"maxLength": 60,
"minLength": 1
}
},
"description": "What you learned about the app from the repo. Never include secrets or user data."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
},
"websiteUrl": {
"type": "string",
"format": "uri",
"maxLength": 300,
"description": "The product website, if known."
},
"intendedUseCase": {
"type": "string",
"maxLength": 1000,
"minLength": 1,
"description": "Which emails the app should send, for example welcome, receipts, or a weekly digest."
},
"companyDescription": {
"type": "string",
"maxLength": 1000,
"minLength": 1,
"description": "What the product does and who uses it, in a sentence or two."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Update project",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use after sign-in and update_project, before share_app_context. Skip it when you sent share_app_context from a recent lifecycle-email-audit/context.json. Returns what Dreamlit needs to understand the app before its database is connected: one read-only schema query to run yourself (a Supabase or Neon MCP server's SQL tool, or psql -At), how to find the database with the app's real users, where to find the schema in code when you can't reach it, the onboarding questions to answer from the repo, and a count-query pattern. Use connection strings locally and never send them. Does not connect to or read the user's database.
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Optional project id. Omit it when the workspace has one project. |
{
"name": "get_app_context_request",
"title": "Get app context request",
"description": "Read-only. Use after sign-in and update_project, before share_app_context. Skip it when you sent share_app_context from a recent lifecycle-email-audit/context.json. Returns what Dreamlit needs to understand the app before its database is connected: one read-only schema query to run yourself (a Supabase or Neon MCP server's SQL tool, or psql -At), how to find the database with the app's real users, where to find the schema in code when you can't reach it, the onboarding questions to answer from the repo, and a count-query pattern. Use connection strings locally and never send them. Does not connect to or read the user's database.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get app context request",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Side effect: saves the app's schema and a summary of how its onboarding works on the project. Use after get_app_context_request, with the schema query's JSON as catalog (or tables you read from code) and the onboarding summary. Works without a connected database, and without a schema. Returns what was stored, summary fields still missing, whether the schema was trimmed to fit, and the next setup step with its setup page link (ask the person to connect the database there), or a completion offer if a database was connected first. Do not send rows, connection strings, email addresses or other personal data; send column names, types and counts only.
| Parameter | Type | Description |
|---|---|---|
| counts | object | Optional. Run SELECT count(*) queries yourself and send only the numbers. Never send rows, connection strings, email addresses or other personal data. Counts only. |
| schema | object | The app's schema. Column names and types only; never rows. Leave it out if you couldn't find one. |
| projectId | string | Optional project id. Omit it when the workspace has one project. |
| onboardingSummary * | object | How the app's onboarding works, from the repo and schema. Never send rows, connection strings, email addresses or other personal data. Counts only. |
{
"name": "share_app_context",
"title": "Share app context",
"description": "Side effect: saves the app's schema and a summary of how its onboarding works on the project. Use after get_app_context_request, with the schema query's JSON as catalog (or tables you read from code) and the onboarding summary. Works without a connected database, and without a schema. Returns what was stored, summary fields still missing, whether the schema was trimmed to fit, and the next setup step with its setup page link (ask the person to connect the database there), or a completion offer if a database was connected first. Do not send rows, connection strings, email addresses or other personal data; send column names, types and counts only.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"onboardingSummary"
],
"properties": {
"counts": {
"type": "object",
"properties": {
"signedUp": {
"type": "integer",
"maximum": 1000000000,
"minimum": 0,
"description": "People who signed up in the window."
},
"stuckNow": {
"type": "integer",
"maximum": 1000000000,
"minimum": 0,
"description": "People who look stuck right now (stuckLooksLike)."
},
"windowDays": {
"type": "integer",
"maximum": 365,
"minimum": 1,
"description": "The window the counts cover, in days."
},
"reachedSteps": {
"type": "array",
"items": {
"type": "integer",
"maximum": 1000000000,
"minimum": 0
},
"maxItems": 5,
"description": "How many of the signedUp people did each of firstSteps, in the same order. Dreamlit draws them as a funnel."
}
},
"description": "Optional. Run SELECT count(*) queries yourself and send only the numbers. Never send rows, connection strings, email addresses or other personal data. Counts only."
},
"schema": {
"type": "object",
"required": [
"source",
"via"
],
"properties": {
"via": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "How you got it, e.g. supabase_mcp, psql, prisma, supabase/migrations, drizzle, schema.rb."
},
"enums": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"labels"
],
"properties": {
"name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"labels": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"maxItems": 100
},
"schema": {
"type": "string",
"default": "public",
"maxLength": 128,
"minLength": 1
}
}
},
"maxItems": 500
},
"source": {
"enum": [
"database",
"code"
],
"type": "string",
"description": "database: you ran the schema query against the app's database. code: you read it from migrations or ORM files."
},
"tables": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"columns"
],
"properties": {
"name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"schema": {
"type": "string",
"default": "public",
"maxLength": 128,
"minLength": 1
},
"columns": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"type": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"nullable": {
"type": "boolean",
"default": true
},
"isPrimaryKey": {
"type": "boolean",
"default": false
}
}
},
"maxItems": 500
}
}
},
"maxItems": 1000,
"description": "Tables you read from code, with column names and Postgres types. Use this when you can't query the database."
},
"catalog": {
"type": "object",
"required": [
"columns"
],
"properties": {
"enums": {
"type": "array",
"items": {
"type": "object",
"required": [
"enum_schema",
"enum_name",
"enum_labels"
],
"properties": {
"enum_name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"enum_labels": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"maxItems": 100
},
{
"type": "string",
"maxLength": 4000
}
]
},
"enum_schema": {
"type": "string",
"maxLength": 128,
"minLength": 1
}
}
},
"default": [],
"maxItems": 1000
},
"columns": {
"type": "array",
"items": {
"type": "object",
"required": [
"table_schema",
"table_name",
"column_name",
"data_type",
"is_nullable",
"is_primary_key"
],
"properties": {
"data_type": {
"type": "string",
"maxLength": 200,
"minLength": 1
},
"table_name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"column_name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"is_nullable": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": [
"t",
"f",
"true",
"false",
"YES",
"NO"
],
"type": "string"
}
]
},
"table_schema": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"is_primary_key": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": [
"t",
"f",
"true",
"false",
"YES",
"NO"
],
"type": "string"
}
]
},
"ordinal_position": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"maxLength": 10
}
]
}
}
},
"maxItems": 20000
},
"foreignKeys": {
"type": "array",
"items": {
"type": "object",
"required": [
"table_schema",
"table_name",
"column_names",
"foreign_table_schema",
"foreign_table_name",
"foreign_column_names"
],
"properties": {
"table_name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"column_names": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"maxItems": 100
},
{
"type": "string",
"maxLength": 4000
}
]
},
"table_schema": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"foreign_table_name": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"foreign_column_names": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"maxItems": 100
},
{
"type": "string",
"maxLength": 4000
}
]
},
"foreign_table_schema": {
"type": "string",
"maxLength": 128,
"minLength": 1
}
}
},
"default": [],
"maxItems": 5000
}
},
"description": "The JSON object get_app_context_request's schemaQuery returns, as is. Use this when you can query the database."
},
"foreignKeys": {
"type": "array",
"items": {
"type": "object",
"required": [
"table",
"columns",
"references",
"referencedColumns"
],
"properties": {
"table": {
"type": "string",
"maxLength": 260,
"minLength": 1,
"description": "schema.table, e.g. public.dogs"
},
"columns": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"maxItems": 16,
"minItems": 1
},
"references": {
"type": "string",
"maxLength": 260,
"minLength": 1,
"description": "schema.table, e.g. public.profiles"
},
"referencedColumns": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128,
"minLength": 1
},
"maxItems": 16,
"minItems": 1
}
}
},
"maxItems": 2000
}
},
"description": "The app's schema. Column names and types only; never rows. Leave it out if you couldn't find one."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
},
"onboardingSummary": {
"type": "object",
"properties": {
"tone": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "How the app talks to users, e.g. 'friendly and short' or 'formal'. Copy it from the landing page or onboarding screens."
},
"evidence": {
"type": "array",
"items": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"maxItems": 5,
"description": "Up to 5 short notes on where you found this, e.g. 'supabase/migrations/0002_dogs.sql'."
},
"userTable": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_$]*(\\.[A-Za-z_][A-Za-z0-9_$]*)?$",
"maxLength": 127,
"description": "The table with one row per user, e.g. profiles or public.profiles."
},
"firstSteps": {
"type": "array",
"items": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"maxItems": 5,
"description": "Up to 5 things a new user should do first, in order, e.g. 'add a dog'."
},
"emailColumn": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_$]*$",
"maxLength": 63,
"description": "The column in userTable with the user's email address, e.g. email."
},
"productName": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "The product's name, as users see it."
},
"followUpIdea": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "One follow-up email idea for people still stuck a day after the first nudge, specific to this product: a different reason to take that step, in a few words, e.g. 'show 3 popular walks nearby'."
},
"signupCreates": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "What signing up creates, e.g. 'a row in profiles with created_at'."
},
"stuckLooksLike": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "What a stuck user looks like, e.g. 'signed up 2+ days ago and has no dogs row'."
},
"trialOrPricing": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"description": "Trial and pricing in a sentence, e.g. '14-day trial, then $9/month'. Leave it out if there is none."
},
"activationAction": {
"type": "object",
"required": [
"description"
],
"properties": {
"table": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_$]*(\\.[A-Za-z_][A-Za-z0-9_$]*)?$",
"maxLength": 127
},
"condition": {
"type": "string",
"maxLength": 300,
"minLength": 1
},
"description": {
"type": "string",
"maxLength": 300,
"minLength": 1
}
},
"description": "The one action that shows a user got value. description is a past-tense phrase ('added a dog'); table and condition say how to see it in the data ('dogs', 'a dogs row with owner_id = profiles.id')."
}
},
"description": "How the app's onboarding works, from the repo and schema. Never send rows, connection strings, email addresses or other personal data. Counts only."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Share app context",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use after the user agrees to database login setup. Returns transactional SQL from Dreamlit's shared role builder for a separate dreamlit_app login, with a password placeholder, grants summary, removal link and local setup instructions. For Postgres that isn't Supabase, including Neon, RDS, Railway and Render. Supabase apps use browser Supabase sign-in instead. Does not connect, run SQL or receive passwords. Lead with the setup page returned by get_setup_status: explain how Dreamlit uses the database, ask the person to connect there, and check get_setup_status when they say it is done. Optionally offer: "If you'd rather, I can connect it from here." Only if the person asks you to connect it does the following path apply. Before setting up a database login or calling connect_database, tell the user in a line or two, in plain words, how Dreamlit uses the database (Dreamlit works straight from the app's database, so it stays the source of truth: no syncing data to another tool and no tracking events to add. It reads the tables to know who should get each email and to fill it in with their real details, reacts as things change in the app (a new signup, an upgrade, a cancelled plan), and never changes the app's data. Nothing reaches users until they approve an email.) Then ask if you may set this up, in your own plain words. For Supabase (a supabase.co or pooler.supabase.com host, a Supabase MCP server or CLI, or an audit database note identifying Supabase), say: "To connect, you'll sign in to Supabase in your browser and pick this project. Dreamlit then sets up its own login that can read your tables but can't change your data. Want the link?" End your message with that question and wait for a yes in a later message, never in the same turn you ask. After that yes, call connect_database without a connection string and give the person the link; when they say it's done, call get_setup_status. Do not run get_database_role_setup or build or pass a Supabase connection string. Supabase sign-in is the supported path: it lets Dreamlit read auth.users and run Supabase Auth workflows. For Postgres that isn't Supabase (including Neon, RDS, Railway and Render), ask: "To connect, I'll create a separate database login for Dreamlit that can read your tables but can't change your data, and give Dreamlit only that login. Your own database password stays on this machine. OK to set that up on <host> / <database>?" End your message with that question and wait; create the login and connect only after they say yes in a later message, never in the same turn you ask. After that yes: get_database_role_setup → run its SQL locally → connect_database with the dreamlit_app connection string → get_setup_status. Get the table-owner role from SELECT current_user or the table owner. Generate a letters-and-digits password locally (for example openssl rand -hex 24), substitute [[REPLACE_WITH_PASSWORD]] locally, and run the transactional script with psql or your database MCP SQL tool using the access you already have. Build the limited connection string locally with username dreamlit_app and the same host, port and database. Never print the password or either connection string, or send the owner password to Dreamlit. If you can't run SQL, the host refuses CREATE ROLE, or the person declines the script, explain that in one line and offer either connecting with the app's own login after a second explicit yes or connect_database without a string for the browser link; never fall back silently. If connect_database returns usesLimitedRole=false, tell the person plainly: "Dreamlit is connected with your app's own database login." If its result includes a Supabase sign-in notice, relay it.
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Optional project id. Omit it when the workspace has one project. |
| databaseName * | string | The database name only, never a connection string. |
| tableOwnerRole * | string | The role that owns the app's tables, from SELECT current_user or the table owner. For Neon this is often neondb_owner; use what the database reports. |
{
"name": "get_database_role_setup",
"title": "Get database role setup",
"description": "Read-only. Use after the user agrees to database login setup. Returns transactional SQL from Dreamlit's shared role builder for a separate dreamlit_app login, with a password placeholder, grants summary, removal link and local setup instructions. For Postgres that isn't Supabase, including Neon, RDS, Railway and Render. Supabase apps use browser Supabase sign-in instead. Does not connect, run SQL or receive passwords. Lead with the setup page returned by get_setup_status: explain how Dreamlit uses the database, ask the person to connect there, and check get_setup_status when they say it is done. Optionally offer: \"If you'd rather, I can connect it from here.\" Only if the person asks you to connect it does the following path apply. Before setting up a database login or calling connect_database, tell the user in a line or two, in plain words, how Dreamlit uses the database (Dreamlit works straight from the app's database, so it stays the source of truth: no syncing data to another tool and no tracking events to add. It reads the tables to know who should get each email and to fill it in with their real details, reacts as things change in the app (a new signup, an upgrade, a cancelled plan), and never changes the app's data. Nothing reaches users until they approve an email.) Then ask if you may set this up, in your own plain words. For Supabase (a supabase.co or pooler.supabase.com host, a Supabase MCP server or CLI, or an audit database note identifying Supabase), say: \"To connect, you'll sign in to Supabase in your browser and pick this project. Dreamlit then sets up its own login that can read your tables but can't change your data. Want the link?\" End your message with that question and wait for a yes in a later message, never in the same turn you ask. After that yes, call connect_database without a connection string and give the person the link; when they say it's done, call get_setup_status. Do not run get_database_role_setup or build or pass a Supabase connection string. Supabase sign-in is the supported path: it lets Dreamlit read auth.users and run Supabase Auth workflows. For Postgres that isn't Supabase (including Neon, RDS, Railway and Render), ask: \"To connect, I'll create a separate database login for Dreamlit that can read your tables but can't change your data, and give Dreamlit only that login. Your own database password stays on this machine. OK to set that up on <host> / <database>?\" End your message with that question and wait; create the login and connect only after they say yes in a later message, never in the same turn you ask. After that yes: get_database_role_setup → run its SQL locally → connect_database with the dreamlit_app connection string → get_setup_status. Get the table-owner role from SELECT current_user or the table owner. Generate a letters-and-digits password locally (for example openssl rand -hex 24), substitute [[REPLACE_WITH_PASSWORD]] locally, and run the transactional script with psql or your database MCP SQL tool using the access you already have. Build the limited connection string locally with username dreamlit_app and the same host, port and database. Never print the password or either connection string, or send the owner password to Dreamlit. If you can't run SQL, the host refuses CREATE ROLE, or the person declines the script, explain that in one line and offer either connecting with the app's own login after a second explicit yes or connect_database without a string for the browser link; never fall back silently. If connect_database returns usesLimitedRole=false, tell the person plainly: \"Dreamlit is connected with your app's own database login.\" If its result includes a Supabase sign-in notice, relay it.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"databaseName",
"tableOwnerRole"
],
"properties": {
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
},
"databaseName": {
"type": "string",
"maxLength": 63,
"minLength": 1,
"description": "The database name only, never a connection string."
},
"tableOwnerRole": {
"type": "string",
"maxLength": 63,
"minLength": 1,
"description": "The role that owns the app's tables, from SELECT current_user or the table owner. For Neon this is often neondb_owner; use what the database reports."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get database role setup",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Side effect: connects the project to the user's Postgres or Supabase database and installs Dreamlit's schema and triggers in it. Use only when the person asks you to connect the database; normally get_setup_status directs them to connect on the setup page. Connect the database that holds the app's real users. Only after the user said yes in reply to the appropriate database consent question; never in the same turn you ask. Without a connection string, returns a link the user opens to connect in the browser (for Supabase, by signing in; no string needed). A database on the user's computer or private network can't be reached. Returns the connection status, usesLimitedRole (from the username), and the next setup step. Does not read or change the user's app data. Lead with the setup page returned by get_setup_status: explain how Dreamlit uses the database, ask the person to connect there, and check get_setup_status when they say it is done. Optionally offer: "If you'd rather, I can connect it from here." Only if the person asks you to connect it does the following path apply. Before setting up a database login or calling connect_database, tell the user in a line or two, in plain words, how Dreamlit uses the database (Dreamlit works straight from the app's database, so it stays the source of truth: no syncing data to another tool and no tracking events to add. It reads the tables to know who should get each email and to fill it in with their real details, reacts as things change in the app (a new signup, an upgrade, a cancelled plan), and never changes the app's data. Nothing reaches users until they approve an email.) Then ask if you may set this up, in your own plain words. For Supabase (a supabase.co or pooler.supabase.com host, a Supabase MCP server or CLI, or an audit database note identifying Supabase), say: "To connect, you'll sign in to Supabase in your browser and pick this project. Dreamlit then sets up its own login that can read your tables but can't change your data. Want the link?" End your message with that question and wait for a yes in a later message, never in the same turn you ask. After that yes, call connect_database without a connection string and give the person the link; when they say it's done, call get_setup_status. Do not run get_database_role_setup or build or pass a Supabase connection string. Supabase sign-in is the supported path: it lets Dreamlit read auth.users and run Supabase Auth workflows. For Postgres that isn't Supabase (including Neon, RDS, Railway and Render), ask: "To connect, I'll create a separate database login for Dreamlit that can read your tables but can't change your data, and give Dreamlit only that login. Your own database password stays on this machine. OK to set that up on <host> / <database>?" End your message with that question and wait; create the login and connect only after they say yes in a later message, never in the same turn you ask. After that yes: get_database_role_setup → run its SQL locally → connect_database with the dreamlit_app connection string → get_setup_status. Get the table-owner role from SELECT current_user or the table owner. Generate a letters-and-digits password locally (for example openssl rand -hex 24), substitute [[REPLACE_WITH_PASSWORD]] locally, and run the transactional script with psql or your database MCP SQL tool using the access you already have. Build the limited connection string locally with username dreamlit_app and the same host, port and database. Never print the password or either connection string, or send the owner password to Dreamlit. If you can't run SQL, the host refuses CREATE ROLE, or the person declines the script, explain that in one line and offer either connecting with the app's own login after a second explicit yes or connect_database without a string for the browser link; never fall back silently. If connect_database returns usesLimitedRole=false, tell the person plainly: "Dreamlit is connected with your app's own database
| Parameter | Type | Description |
|---|---|---|
| projectId | string | Optional project id. Omit it when the workspace has one project. |
| connectionString | string | For Postgres that isn't Supabase, the dreamlit_app connection string created locally after get_database_role_setup. Send it only after the user agreed to setting up that host and database. The app's own login is also accepted, but requires a second explicit yes after explaining the fallback. Omit it… |
{
"name": "connect_database",
"title": "Connect database",
"description": "Side effect: connects the project to the user's Postgres or Supabase database and installs Dreamlit's schema and triggers in it. Use only when the person asks you to connect the database; normally get_setup_status directs them to connect on the setup page. Connect the database that holds the app's real users. Only after the user said yes in reply to the appropriate database consent question; never in the same turn you ask. Without a connection string, returns a link the user opens to connect in the browser (for Supabase, by signing in; no string needed). A database on the user's computer or private network can't be reached. Returns the connection status, usesLimitedRole (from the username), and the next setup step. Does not read or change the user's app data. Lead with the setup page returned by get_setup_status: explain how Dreamlit uses the database, ask the person to connect there, and check get_setup_status when they say it is done. Optionally offer: \"If you'd rather, I can connect it from here.\" Only if the person asks you to connect it does the following path apply. Before setting up a database login or calling connect_database, tell the user in a line or two, in plain words, how Dreamlit uses the database (Dreamlit works straight from the app's database, so it stays the source of truth: no syncing data to another tool and no tracking events to add. It reads the tables to know who should get each email and to fill it in with their real details, reacts as things change in the app (a new signup, an upgrade, a cancelled plan), and never changes the app's data. Nothing reaches users until they approve an email.) Then ask if you may set this up, in your own plain words. For Supabase (a supabase.co or pooler.supabase.com host, a Supabase MCP server or CLI, or an audit database note identifying Supabase), say: \"To connect, you'll sign in to Supabase in your browser and pick this project. Dreamlit then sets up its own login that can read your tables but can't change your data. Want the link?\" End your message with that question and wait for a yes in a later message, never in the same turn you ask. After that yes, call connect_database without a connection string and give the person the link; when they say it's done, call get_setup_status. Do not run get_database_role_setup or build or pass a Supabase connection string. Supabase sign-in is the supported path: it lets Dreamlit read auth.users and run Supabase Auth workflows. For Postgres that isn't Supabase (including Neon, RDS, Railway and Render), ask: \"To connect, I'll create a separate database login for Dreamlit that can read your tables but can't change your data, and give Dreamlit only that login. Your own database password stays on this machine. OK to set that up on <host> / <database>?\" End your message with that question and wait; create the login and connect only after they say yes in a later message, never in the same turn you ask. After that yes: get_database_role_setup → run its SQL locally → connect_database with the dreamlit_app connection string → get_setup_status. Get the table-owner role from SELECT current_user or the table owner. Generate a letters-and-digits password locally (for example openssl rand -hex 24), substitute [[REPLACE_WITH_PASSWORD]] locally, and run the transactional script with psql or your database MCP SQL tool using the access you already have. Build the limited connection string locally with username dreamlit_app and the same host, port and database. Never print the password or either connection string, or send the owner password to Dreamlit. If you can't run SQL, the host refuses CREATE ROLE, or the person declines the script, explain that in one line and offer either connecting with the app's own login after a second explicit yes or connect_database without a string for the browser link; never fall back silently. If connect_database returns usesLimitedRole=false, tell the person plainly: \"Dreamlit is connected with your app's own database ",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
},
"connectionString": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "For Postgres that isn't Supabase, the dreamlit_app connection string created locally after get_database_role_setup. Send it only after the user agreed to setting up that host and database. The app's own login is also accepted, but requires a second explicit yes after explaining the fallback. Omit it to get a link the user can open instead; for Supabase that link connects by signing in, with no connection string."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Connect database",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}Side effect: registers the domain Dreamlit emails will come from. Use when the user wants emails from their own domain instead of Dreamlit's shared address. Starts verification. Returns the DNS records to add and a settings link with one-click DNS setup; if you have a DNS tool, you can add them yourself after the user agrees. Does not change DNS by itself.
| Parameter | Type | Description |
|---|---|---|
| domain * | string | The domain emails should come from, for example acme.com. |
| projectId | string | Optional project id. Omit it when the workspace has one project. |
{
"name": "configure_sender_domain",
"title": "Configure sender domain",
"description": "Side effect: registers the domain Dreamlit emails will come from. Use when the user wants emails from their own domain instead of Dreamlit's shared address. Starts verification. Returns the DNS records to add and a settings link with one-click DNS setup; if you have a DNS tool, you can add them yourself after the user agrees. Does not change DNS by itself.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"domain"
],
"properties": {
"domain": {
"type": "string",
"maxLength": 253,
"minLength": 3,
"description": "The domain emails should come from, for example acme.com."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional project id. Omit it when the workspace has one project."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Configure sender domain",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Creates a new Dreamlit workflow draft or updates an existing draft from an outcome-oriented natural-language prompt. Use after get_status; use get_workflow_and_preview_url first when editing an existing workflow, then describe the steps to change by what they do, not by step id. Each call continues the workflow's current chat; pass startNewChat to start fresh. Broadcasts that are scheduled, sent, or cancelled can't be edited; duplicate them in the Dreamlit web app instead. Existing Supabase Auth workflows can be edited except for the immutable trigger step; creating Supabase Auth workflows must happen through Supabase Auth email setup in the Dreamlit web app. Side effect: may create or modify a draft, but does not publish or install live triggers. Returns the workflow/draft result, action-required or handoff details when more input is needed, and relevant app URLs. For a broadcast or scheduled email to a group, when the project's segments or current moment haven't been answered yet, the draft is saved and the result is clarification_required (kind project_context): look the answers up, save them with update_project, then call again to adjust the draft. On success, changes lists each step the call added, updated (with the fields that changed), or removed, read from the saved draft, and warnings names any planned change that saved nothing; trust changes over assistantResponse, which is Dreamlit's plan in its own words. Do not use for publishing, direct database changes, or low-level graph edits.
| Parameter | Type | Description |
|---|---|---|
| name | string | Name for a new workflow draft. Use when the user names the workflow; otherwise Dreamlit picks one. Only valid when creating; use rename_workflow to rename an existing workflow. |
| prompt * | string | Outcome-oriented workflow authoring request. Describe the event or schedule, audience, recipient, message goal, data needed, timing, business rules, and unsubscribe intent. When editing, refer to existing steps by what they do (for example, the query that finds returning customers, or the email with… |
| projectId | string | Target project id for creating a new workflow draft. |
| workflowId | string | Existing workflow id to continue editing. Use get_workflow_and_preview_url first when changing an existing workflow. |
| startNewChat | boolean | Start a fresh Dreamlit chat for this request instead of continuing the workflow's current chat. The new chat still sees the current draft but not earlier turns. Use when switching to an unrelated change, after long turns with pasted SQL or HTML, or when Dreamlit keeps misreading the request. Ignored… |
| userCurrentTimeIso | string | User's current time as an ISO timestamp with offset, useful for relative schedule requests. |
| userCurrentTimeZoneId | string | IANA timezone id for the user, useful for repeating workflows and scheduled broadcasts. |
| userEmailStepComments | array | Optional inline comments for revising email step content. |
{
"name": "create_or_update_workflow",
"title": "Create or update workflow",
"description": "Creates a new Dreamlit workflow draft or updates an existing draft from an outcome-oriented natural-language prompt. Use after get_status; use get_workflow_and_preview_url first when editing an existing workflow, then describe the steps to change by what they do, not by step id. Each call continues the workflow's current chat; pass startNewChat to start fresh. Broadcasts that are scheduled, sent, or cancelled can't be edited; duplicate them in the Dreamlit web app instead. Existing Supabase Auth workflows can be edited except for the immutable trigger step; creating Supabase Auth workflows must happen through Supabase Auth email setup in the Dreamlit web app. Side effect: may create or modify a draft, but does not publish or install live triggers. Returns the workflow/draft result, action-required or handoff details when more input is needed, and relevant app URLs. For a broadcast or scheduled email to a group, when the project's segments or current moment haven't been answered yet, the draft is saved and the result is clarification_required (kind project_context): look the answers up, save them with update_project, then call again to adjust the draft. On success, changes lists each step the call added, updated (with the fields that changed), or removed, read from the saved draft, and warnings names any planned change that saved nothing; trust changes over assistantResponse, which is Dreamlit's plan in its own words. Do not use for publishing, direct database changes, or low-level graph edits.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"prompt"
],
"properties": {
"name": {
"type": "string",
"description": "Name for a new workflow draft. Use when the user names the workflow; otherwise Dreamlit picks one. Only valid when creating; use rename_workflow to rename an existing workflow."
},
"prompt": {
"type": "string",
"minLength": 1,
"description": "Outcome-oriented workflow authoring request. Describe the event or schedule, audience, recipient, message goal, data needed, timing, business rules, and unsubscribe intent. When editing, refer to existing steps by what they do (for example, the query that finds returning customers, or the email with subject \"Welcome back\"), never by step id. Let Dreamlit choose email styling unless the user gives specific style direction. For broadcasts, request a future send time instead of an immediate send."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Target project id for creating a new workflow draft."
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Existing workflow id to continue editing. Use get_workflow_and_preview_url first when changing an existing workflow."
},
"startNewChat": {
"type": "boolean",
"description": "Start a fresh Dreamlit chat for this request instead of continuing the workflow's current chat. The new chat still sees the current draft but not earlier turns. Use when switching to an unrelated change, after long turns with pasted SQL or HTML, or when Dreamlit keeps misreading the request. Ignored when creating a workflow."
},
"userCurrentTimeIso": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "User's current time as an ISO timestamp with offset, useful for relative schedule requests."
},
"userCurrentTimeZoneId": {
"type": "string",
"minLength": 1,
"description": "IANA timezone id for the user, useful for repeating workflows and scheduled broadcasts."
},
"userEmailStepComments": {
"type": "array",
"items": {
"type": "object",
"required": [
"workflowStepId",
"comment",
"onCodeLineText",
"userHighlightedText"
],
"properties": {
"comment": {
"type": "string",
"minLength": 1,
"description": "User's requested change."
},
"onCodeLineText": {
"type": "string",
"minLength": 1,
"description": "Nearby email editor text for anchoring the comment."
},
"workflowStepId": {
"type": "string",
"minLength": 1,
"description": "Workflow step id that the user commented on."
},
"userHighlightedText": {
"type": "string",
"minLength": 1,
"description": "Specific text selected by the user."
}
}
},
"description": "Optional inline comments for revising email step content."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Create or update workflow",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Applies up to 5 exact edits to existing steps in a workflow draft, instantly and without AI: email subject, preview text, HTML, sender, reply-to, and recipient; Slack message; query SQL; wait rule; and step description. Use when you know the exact new value; call get_workflow_and_preview_url first for step ids and current values, with includeEmailHtml to edit HTML. Edits are checked against the draft as it will be once they are all saved: templates and waits may only use fields their step gets, and query edits are rejected if later steps still use fields the new query no longer returns. Each edit applies on its own, except that a SQL edit and the edits below it apply together or not at all. The edits show in the workflow's Dreamlit chat. Side effect: changes the draft only; does not publish. Returns each edit's status with an error code and message for failed edits, and app URLs. Do not use to add, remove, or move steps, edit triggers, or make changes that need writing or judgment; use create_or_update_workflow for those.
| Parameter | Type | Description |
|---|---|---|
| edits * | array | Up to 5 edits, each to a different existing step. Fields must match the step type: email* fields for email steps, slackTemplate for Slack, queryText for queries, wait for waits. |
| workflowId * | string | Workflow whose draft to edit. |
{
"name": "edit_workflow_steps",
"title": "Edit workflow steps",
"description": "Applies up to 5 exact edits to existing steps in a workflow draft, instantly and without AI: email subject, preview text, HTML, sender, reply-to, and recipient; Slack message; query SQL; wait rule; and step description. Use when you know the exact new value; call get_workflow_and_preview_url first for step ids and current values, with includeEmailHtml to edit HTML. Edits are checked against the draft as it will be once they are all saved: templates and waits may only use fields their step gets, and query edits are rejected if later steps still use fields the new query no longer returns. Each edit applies on its own, except that a SQL edit and the edits below it apply together or not at all. The edits show in the workflow's Dreamlit chat. Side effect: changes the draft only; does not publish. Returns each edit's status with an error code and message for failed edits, and app URLs. Do not use to add, remove, or move steps, edit triggers, or make changes that need writing or judgment; use create_or_update_workflow for those.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId",
"edits"
],
"properties": {
"edits": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId"
],
"properties": {
"wait": {
"oneOf": [
{
"type": "object",
"required": [
"kind",
"amount",
"unit"
],
"properties": {
"kind": {
"type": "string",
"const": "duration"
},
"unit": {
"enum": [
"minutes",
"hours",
"days"
],
"type": "string"
},
"amount": {
"type": "integer",
"maximum": 9007199254740991,
"description": "How long to wait, up to 365 days in total.",
"exclusiveMinimum": 0
}
}
},
{
"type": "object",
"required": [
"kind",
"field"
],
"properties": {
"kind": {
"type": "string",
"const": "until_row_field"
},
"field": {
"type": "string",
"minLength": 1,
"description": "Field from the step's input rows that holds a date and time with an offset, such as renewal_reminder_at. The wait ends at that time."
}
}
}
],
"description": "Replaces the whole wait rule: a fixed duration, or until the date and time in a row field."
},
"stepId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Existing step id from get_workflow_and_preview_url."
},
"emailTo": {
"type": "string",
"minLength": 1,
"description": "Recipient address or Liquid, such as {{ email }}."
},
"emailHtml": {
"type": "string",
"minLength": 1,
"description": "Full replacement email HTML body. Liquid allowed. Read the current body with get_workflow_and_preview_url includeEmailHtml first. Emails that allow unsubscribe must keep a link to {{ dreamlit_unsubscribe_url }}."
},
"queryText": {
"type": "string",
"minLength": 1,
"description": "Full replacement SQL for a query step. Must stay read-only and keep returning the fields later steps use."
},
"description": {
"type": "string",
"description": "Step description for email, query, or Slack steps. Empty string clears it."
},
"emailReplyTo": {
"type": "string",
"description": "Reply-to address. Empty string clears it."
},
"emailSubject": {
"type": "string",
"minLength": 1,
"description": "Email subject. Liquid allowed."
},
"emailFromName": {
"type": "string",
"description": "Sender name. Empty string clears it."
},
"slackTemplate": {
"type": "string",
"minLength": 1,
"description": "Full replacement Slack message. Liquid allowed."
},
"emailFromAddress": {
"type": "string",
"minLength": 1,
"description": "Sender address on one of the project's sending domains."
},
"emailPreviewText": {
"type": "string",
"description": "Email preview text. Liquid allowed. Empty string clears it."
}
},
"additionalProperties": false
},
"maxItems": 5,
"minItems": 1,
"description": "Up to 5 edits, each to a different existing step. Fields must match the step type: email* fields for email steps, slackTemplate for Slack, queryText for queries, wait for waits."
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow whose draft to edit."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Edit workflow steps",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Use when the user asks to rename an existing Dreamlit workflow. Side effect: changes only the workflow name; the draft, published version, and live triggers are unchanged. Returns the updated name and app URLs. Do not use to edit workflow content or to name a new workflow; pass name to create_or_update_workflow instead.
| Parameter | Type | Description |
|---|---|---|
| name * | string | New workflow name. Leading and trailing spaces are removed; it can't be blank. |
| workflowId * | string | Workflow id to rename. |
{
"name": "rename_workflow",
"title": "Rename workflow",
"description": "Use when the user asks to rename an existing Dreamlit workflow. Side effect: changes only the workflow name; the draft, published version, and live triggers are unchanged. Returns the updated name and app URLs. Do not use to edit workflow content or to name a new workflow; pass name to create_or_update_workflow instead.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "New workflow name. Leading and trailing spaces are removed; it can't be blank."
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to rename."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Rename workflow",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when the user asks to put a workflow or broadcast in a folder, move it to another folder, or take it out of a folder. Folders are per list: the Published and Drafts lists on the Workflows page and the Sent and Drafts lists on the Broadcasts page each have their own folders, and this moves the workflow within the list it shows in now. Folders are flat; a "/" is just part of the name. A draft's folder does not carry over when it is published. Side effect: may create the folder; never deletes folders and does not change the draft, published version, or live triggers. Returns the folder, the list, and app URLs. Do not use to rename or delete folders.
| Parameter | Type | Description |
|---|---|---|
| folder * | any | Folder name, up to 64 characters. Matching ignores case and leading or trailing spaces; Dreamlit creates the folder if it doesn't exist yet. Pass null to take the workflow out of its folder. |
| workflowId * | string | Workflow id to move. |
{
"name": "move_workflow_to_folder",
"title": "Move workflow to folder",
"description": "Use when the user asks to put a workflow or broadcast in a folder, move it to another folder, or take it out of a folder. Folders are per list: the Published and Drafts lists on the Workflows page and the Sent and Drafts lists on the Broadcasts page each have their own folders, and this moves the workflow within the list it shows in now. Folders are flat; a \"/\" is just part of the name. A draft's folder does not carry over when it is published. Side effect: may create the folder; never deletes folders and does not change the draft, published version, or live triggers. Returns the folder, the list, and app URLs. Do not use to rename or delete folders.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId",
"folder"
],
"properties": {
"folder": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Folder name, up to 64 characters. Matching ignores case and leading or trailing spaces; Dreamlit creates the folder if it doesn't exist yet. Pass null to take the workflow out of its folder."
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to move."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Move workflow to folder",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use when the target project is unknown or the user names a project instead of providing an id. Returns accessible Dreamlit projects in the approved workspace with project and workflow-list URLs. Do not use to inspect workflow structure or author changes.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of projects to return. |
| search | string | Optional project name search string. |
{
"name": "list_projects",
"title": "List projects",
"description": "Read-only. Use when the target project is unknown or the user names a project instead of providing an id. Returns accessible Dreamlit projects in the approved workspace with project and workflow-list URLs. Do not use to inspect workflow structure or author changes.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "integer",
"default": 25,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of projects to return."
},
"search": {
"type": "string",
"maxLength": 200,
"description": "Optional project name search string."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "List projects",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use to find workflows in a project by name, description, or trigger type before inspection or editing. Trigger filters include database, auth email, repeating, broadcast, and no-trigger workflows. Returns paginated workflow summaries, published/sandbox state, liveStatus, trigger type, folder (the folder name in the list the workflow shows in, or null), workflow URLs, totalCount, hasMore, and nextOffset. Broadcasts also include a broadcast object with state (draft, scheduled, sending, sent, cancelled, or failed), scheduledFor, and cancelledAt or completedAt; for broadcasts, broadcast.state and liveStatus are authoritative over published, because a cancelled broadcast stays published but will not send. Do not use as the final source of truth before editing; call get_workflow_and_preview_url for full structure.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of workflows to return for this page. |
| offset | integer | Zero-based workflow offset for pagination. Use nextOffset from the previous response to fetch the next page. |
| search | string | Optional workflow name or description search string. |
| projectId | string | Project id to list workflows from. Required when access is ambiguous. |
| triggerFilters | array | Optional trigger type filters. Use broadcast only for one-time audience emails. |
{
"name": "list_workflows",
"title": "List workflows",
"description": "Read-only. Use to find workflows in a project by name, description, or trigger type before inspection or editing. Trigger filters include database, auth email, repeating, broadcast, and no-trigger workflows. Returns paginated workflow summaries, published/sandbox state, liveStatus, trigger type, folder (the folder name in the list the workflow shows in, or null), workflow URLs, totalCount, hasMore, and nextOffset. Broadcasts also include a broadcast object with state (draft, scheduled, sending, sent, cancelled, or failed), scheduledFor, and cancelledAt or completedAt; for broadcasts, broadcast.state and liveStatus are authoritative over published, because a cancelled broadcast stays published but will not send. Do not use as the final source of truth before editing; call get_workflow_and_preview_url for full structure.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "integer",
"default": 80,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of workflows to return for this page."
},
"offset": {
"type": "integer",
"default": 0,
"maximum": 9007199254740991,
"minimum": 0,
"description": "Zero-based workflow offset for pagination. Use nextOffset from the previous response to fetch the next page."
},
"search": {
"type": "string",
"maxLength": 200,
"description": "Optional workflow name or description search string."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Project id to list workflows from. Required when access is ambiguous."
},
"triggerFilters": {
"type": "array",
"items": {
"enum": [
"auth_email",
"database",
"broadcast",
"repeating",
"none"
],
"type": "string"
},
"description": "Optional trigger type filters. Use broadcast only for one-time audience emails."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "List workflows",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use when the user wants to inspect saved project brand styles for generated email drafts. Returns paginated project brand style summaries, ids, default status, style metadata, and app URLs. Do not use to create, update, delete, or expose raw style provenance.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Maximum number of brand styles to return for this page. |
| offset | integer | Zero-based brand style offset for pagination. Use nextOffset from the previous response to fetch the next page. |
| projectId | string | Project id to list brand styles from. Required when access is ambiguous. |
{
"name": "list_brand_styles",
"title": "List brand styles",
"description": "Read-only. Use when the user wants to inspect saved project brand styles for generated email drafts. Returns paginated project brand style summaries, ids, default status, style metadata, and app URLs. Do not use to create, update, delete, or expose raw style provenance.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of brand styles to return for this page."
},
"offset": {
"type": "integer",
"default": 0,
"maximum": 9007199254740991,
"minimum": 0,
"description": "Zero-based brand style offset for pagination. Use nextOffset from the previous response to fetch the next page."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Project id to list brand styles from. Required when access is ambiguous."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "List brand styles",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use before editing, verifying, or preparing publish for an existing workflow. Returns normalized draft and published workflow structure, liveStatus, the Dreamlit preview/builder URL, and status URLs. Broadcasts also include a broadcast object with state (draft, scheduled, sending, sent, cancelled, or failed), the run's scheduledFor, and cancelledAt or completedAt; this, not published or the trigger's sendAt, says whether the broadcast will send. Email HTML bodies are left out unless includeEmailHtml is true. Pass step ids only to edit_workflow_steps; when asking create_or_update_workflow for changes, describe steps by what they do. Do not use to create, update, publish, or unpublish workflows.
| Parameter | Type | Description |
|---|---|---|
| workflowId * | string | Workflow id to inspect before editing, verifying, or publishing. |
| includeEmailHtml | boolean | Also return each email step's full HTML body as emailTemplate.html. Off by default because bodies are large; turn on before editing email HTML with edit_workflow_steps. |
{
"name": "get_workflow_and_preview_url",
"title": "Get workflow and preview URL",
"description": "Read-only. Use before editing, verifying, or preparing publish for an existing workflow. Returns normalized draft and published workflow structure, liveStatus, the Dreamlit preview/builder URL, and status URLs. Broadcasts also include a broadcast object with state (draft, scheduled, sending, sent, cancelled, or failed), the run's scheduledFor, and cancelledAt or completedAt; this, not published or the trigger's sendAt, says whether the broadcast will send. Email HTML bodies are left out unless includeEmailHtml is true. Pass step ids only to edit_workflow_steps; when asking create_or_update_workflow for changes, describe steps by what they do. Do not use to create, update, publish, or unpublish workflows.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to inspect before editing, verifying, or publishing."
},
"includeEmailHtml": {
"type": "boolean",
"description": "Also return each email step's full HTML body as emailTemplate.html. Off by default because bodies are large; turn on before editing email HTML with edit_workflow_steps."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get workflow and preview URL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Read-only. Use get_analytics to query raw notification analytics: email and Slack sends and deliveries, email opens, clicks and bounces, overview metrics, per-recipient rows and workflow run rows, with filters, sorting, and cursor pagination. Returns bounded structured analytics data, effective query metadata, pagination details when rows are included, and relevant app URLs. Use get_lifecycle_report or get_recommendations for Dreamlit's prepared analysis. Does not provide Dreamlit's lifecycle judgments or prioritized recommendations. Do not use for CSV exports, bulk dumps, workflow edits, publishing, or low-level database access.
| Parameter | Type | Description |
|---|---|---|
| sort | object | Optional row sort. Overview ignores sorting. |
| view * | string | Analytics surface to query: overview cards, notification rows, recipient rows, or workflow run rows. |
| limit | integer | Maximum rows to return. Defaults to 25 and is capped at 100. |
| range | object | Optional explicit timestamp range. Overrides window and is applied to the view's primary timestamp. |
| cursor | string | Opaque pagination cursor from a previous get_analytics response. |
| window | string | Relative analytics window. Defaults to 30d. Ignored when range is provided. |
| channel | string | Notification channel for overview and notification analytics. Defaults to email. Recipient analytics are email-only. |
| filters | object | Optional analytics filters. Unsupported combinations return a clear error. |
| include | array | Optional response sections to include. Defaults depend on the requested view. |
| timeZone | string | IANA timezone for daily series bucketing. Defaults to UTC. |
| projectId | string | Project id to query analytics from. Required when access is ambiguous. |
{
"name": "get_analytics",
"title": "Get analytics",
"description": "Read-only. Use get_analytics to query raw notification analytics: email and Slack sends and deliveries, email opens, clicks and bounces, overview metrics, per-recipient rows and workflow run rows, with filters, sorting, and cursor pagination. Returns bounded structured analytics data, effective query metadata, pagination details when rows are included, and relevant app URLs. Use get_lifecycle_report or get_recommendations for Dreamlit's prepared analysis. Does not provide Dreamlit's lifecycle judgments or prioritized recommendations. Do not use for CSV exports, bulk dumps, workflow edits, publishing, or low-level database access.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view"
],
"properties": {
"sort": {
"type": "object",
"required": [
"field"
],
"properties": {
"dir": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction. Defaults to desc."
},
"field": {
"enum": [
"timestamp",
"sentTo",
"subject",
"workflow",
"engagement",
"recipient",
"lastSentAt",
"sent",
"opened",
"clicked",
"bounced",
"complained"
],
"type": "string",
"description": "Sort field. Valid fields depend on the requested view."
}
},
"description": "Optional row sort. Overview ignores sorting."
},
"view": {
"enum": [
"overview",
"notifications",
"recipients",
"workflow_runs"
],
"type": "string",
"description": "Analytics surface to query: overview cards, notification rows, recipient rows, or workflow run rows."
},
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Maximum rows to return. Defaults to 25 and is capped at 100."
},
"range": {
"type": "object",
"properties": {
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Inclusive ISO timestamp upper bound."
},
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Inclusive ISO timestamp lower bound."
}
},
"description": "Optional explicit timestamp range. Overrides window and is applied to the view's primary timestamp."
},
"cursor": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Opaque pagination cursor from a previous get_analytics response."
},
"window": {
"enum": [
"1h",
"24h",
"7d",
"14d",
"30d",
"90d",
"all"
],
"type": "string",
"description": "Relative analytics window. Defaults to 30d. Ignored when range is provided."
},
"channel": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Notification channel for overview and notification analytics. Defaults to email. Recipient analytics are email-only."
},
"filters": {
"type": "object",
"properties": {
"topicIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"maxItems": 100,
"description": "Email unsubscribe topic ids to include."
},
"recipient": {
"type": "string",
"maxLength": 320,
"description": "Email recipient search string."
},
"startedAt": {
"type": "object",
"properties": {
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Inclusive ISO timestamp upper bound."
},
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Inclusive ISO timestamp lower bound."
}
},
"description": "Workflow run started timestamp range. Only applies to workflow_runs."
},
"engagement": {
"enum": [
"undelivered",
"bounced",
"complained",
"clicked",
"opened"
],
"type": "string",
"description": "Email engagement filter."
},
"runStatuses": {
"type": "array",
"items": {
"enum": [
"RUNNING",
"PAUSED",
"COMPLETED",
"FAILED",
"SKIPPED",
"CANCELLED"
],
"type": "string"
},
"maxItems": 6,
"description": "Workflow run statuses to include. Only applies to workflow_runs."
},
"workflowIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"maxItems": 100,
"description": "Workflow ids to include."
},
"workflowRunId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow run id to include for notification analytics."
},
"slackWebhookIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"maxItems": 100,
"description": "Slack webhook ids to include for Slack notification analytics."
},
"workflowStepRunId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow step run id to include for notification analytics."
},
"notificationStatuses": {
"type": "array",
"items": {
"enum": [
"sent",
"pending",
"releasable",
"failed",
"canceled",
"suppressed",
"opted_out"
],
"type": "string"
},
"maxItems": 7,
"description": "Email notification lifecycle statuses to include."
}
},
"description": "Optional analytics filters. Unsupported combinations return a clear error."
},
"include": {
"type": "array",
"items": {
"enum": [
"summary",
"series",
"rows",
"recentEvents",
"segments"
],
"type": "string"
},
"maxItems": 5,
"description": "Optional response sections to include. Defaults depend on the requested view."
},
"timeZone": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "IANA timezone for daily series bucketing. Defaults to UTC."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Project id to query analytics from. Required when access is ambiguous."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get analytics",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Side effect: creates a preparation request when no report is ready or refresh is true and the latest report became ready more than 24 hours ago; repeat calls reuse an open request. Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Use for Dreamlit's prepared lifecycle analysis: key metrics worth tracking, the signup-to-paid funnel and where users drop off, deliverability health, and which stages (welcome, onboarding, engagement, retention, winback) have no emails yet. Available on Pro and Scale plans only. Reports are prepared by Dreamlit's agents and reviewed by our team. Returns a ready report or a processing state while Dreamlit prepares it; check back later. The requester is also emailed when ready. Does not return raw notification analytics; use get_analytics for that.
| Parameter | Type | Description |
|---|---|---|
| refresh | boolean | Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Reuses an open request, otherwise returns the latest report if it was ready within the last 24 hours, or requests a new one. |
| projectId | string | Project id. Optional when a personal token pins the project or exactly one project is available in the approved workspace. |
{
"name": "get_lifecycle_report",
"title": "Get lifecycle report",
"description": "Side effect: creates a preparation request when no report is ready or refresh is true and the latest report became ready more than 24 hours ago; repeat calls reuse an open request. Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Use for Dreamlit's prepared lifecycle analysis: key metrics worth tracking, the signup-to-paid funnel and where users drop off, deliverability health, and which stages (welcome, onboarding, engagement, retention, winback) have no emails yet. Available on Pro and Scale plans only. Reports are prepared by Dreamlit's agents and reviewed by our team. Returns a ready report or a processing state while Dreamlit prepares it; check back later. The requester is also emailed when ready. Does not return raw notification analytics; use get_analytics for that.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"refresh": {
"type": "boolean",
"description": "Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Reuses an open request, otherwise returns the latest report if it was ready within the last 24 hours, or requests a new one."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Project id. Optional when a personal token pins the project or exactly one project is available in the approved workspace."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get lifecycle report",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Side effect: creates a preparation request when no report is ready or refresh is true and the latest report became ready more than 24 hours ago; repeat calls reuse an open request. Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Use for Dreamlit's prioritized recommendations on which emails or workflows to add and what to fix or change in existing ones. Available on Pro and Scale plans only. Reports are prepared by Dreamlit's agents and reviewed by our team. Returns a ready report or a processing state while Dreamlit prepares it; check back later. The requester is also emailed when ready. Does not return raw notification analytics; use get_analytics for that.
| Parameter | Type | Description |
|---|---|---|
| refresh | boolean | Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Reuses an open request, otherwise returns the latest report if it was ready within the last 24 hours, or requests a new one. |
| projectId | string | Project id. Optional when a personal token pins the project or exactly one project is available in the approved workspace. |
{
"name": "get_recommendations",
"title": "Get recommendations",
"description": "Side effect: creates a preparation request when no report is ready or refresh is true and the latest report became ready more than 24 hours ago; repeat calls reuse an open request. Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Use for Dreamlit's prioritized recommendations on which emails or workflows to add and what to fix or change in existing ones. Available on Pro and Scale plans only. Reports are prepared by Dreamlit's agents and reviewed by our team. Returns a ready report or a processing state while Dreamlit prepares it; check back later. The requester is also emailed when ready. Does not return raw notification analytics; use get_analytics for that.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"refresh": {
"type": "boolean",
"description": "Pass refresh: true only when the user asks for a new report; when checking on a pending report, call without refresh. Reuses an open request, otherwise returns the latest report if it was ready within the last 24 hours, or requests a new one."
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Project id. Optional when a personal token pins the project or exactly one project is available in the approved workspace."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Get recommendations",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Side effect when confirmSend is true: sends one current draft email or Slack message for review, but does not publish, schedule, or edit the workflow. Use after authoring or inspection when the user wants to verify an important message before publishing. Returns sent-test details, app URLs, a confirmation request, or a clarification request with user-facing message choices. If the test has no data because row level security hides a source table's rows from Dreamlit, returns error code table_rows_hidden_by_rls with unreadableTables[].fixSql to run, or ask the user to run, in the Supabase SQL editor. Do not expose test target ids as copy; ask users to choose by message label and confirm before sending.
| Parameter | Type | Description |
|---|---|---|
| rowData | object | Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available. |
| workflowId * | string | Workflow id whose editable draft message should be tested. |
| confirmSend | boolean | Set to true only after the user explicitly confirms sending this selected test message. If omitted or false, Dreamlit returns confirmation_required and does not send. |
| messageType | string | Optional message type filter when selecting a draft message to test. |
| testTargetId | string | Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label. |
| testRecipientEmail | string | Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address. |
{
"name": "send_workflow_test",
"title": "Send workflow test",
"description": "Side effect when confirmSend is true: sends one current draft email or Slack message for review, but does not publish, schedule, or edit the workflow. Use after authoring or inspection when the user wants to verify an important message before publishing. Returns sent-test details, app URLs, a confirmation request, or a clarification request with user-facing message choices. If the test has no data because row level security hides a source table's rows from Dreamlit, returns error code table_rows_hidden_by_rls with unreadableTables[].fixSql to run, or ask the user to run, in the Supabase SQL editor. Do not expose test target ids as copy; ask users to choose by message label and confirm before sending.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"description": "Set to true only after the user explicitly confirms sending this selected test message. If omitted or false, Dreamlit returns confirmation_required and does not send."
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Send workflow test",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}Read-only validation step before publishing. Use after the user asks to publish and after inspecting the workflow if needed. Returns validation status, publish mode, preview URL, sender domain state and shared address allowance, and a confirmation payload with version/timestamp safety checks for confirm_publish. A broadcast exceeding the remaining shared address allowance returns shared_sender_limit and an addDomain link; offer configure_sender_domain or a narrower audience. If there is no domain, offer their domain or the shared address with its returned daily or monthly limit once before first publish. Before the project's first publish, returns clarification_required (kind project_context) once if nobody has said whether anything else emails these people: look it up, save it with update_project, then call again. Does not publish or schedule anything by itself.
| Parameter | Type | Description |
|---|---|---|
| workflowId * | string | Workflow id to validate and prepare for explicit publish approval. |
{
"name": "prepare_publish",
"title": "Prepare publish",
"description": "Read-only validation step before publishing. Use after the user asks to publish and after inspecting the workflow if needed. Returns validation status, publish mode, preview URL, sender domain state and shared address allowance, and a confirmation payload with version/timestamp safety checks for confirm_publish. A broadcast exceeding the remaining shared address allowance returns shared_sender_limit and an addDomain link; offer configure_sender_domain or a narrower audience. If there is no domain, offer their domain or the shared address with its returned daily or monthly limit once before first publish. Before the project's first publish, returns clarification_required (kind project_context) once if nobody has said whether anything else emails these people: look it up, save it with update_project, then call again. Does not publish or schedule anything by itself.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to validate and prepare for explicit publish approval."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Prepare publish",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use only after explicit user confirmation and a prior prepare_publish result to publish or schedule a Dreamlit workflow. Side effect: installs live database/repeating/auth triggers, schedules or sends broadcasts, and may enable notification delivery; sandbox mode can hold notifications for inspection. Returns the published workflow status and app URLs. Do not call speculatively or without carrying forward the prepare_publish safety fields.
| Parameter | Type | Description |
|---|---|---|
| workflowId * | string | Workflow id to publish. |
| isSandboxed | boolean | Whether to publish in sandbox mode so notifications are held for inspection. |
| expectedUpdatedAtIso | any | Workflow updatedAt timestamp returned by prepare_publish, used as a safety check. |
| expectedEditableVersionId | any | Editable version id returned by prepare_publish, used as a safety check. |
| expectedPublishedVersionId | any | Published version id returned by prepare_publish, used as a safety check. |
{
"name": "confirm_publish",
"title": "Confirm publish",
"description": "Use only after explicit user confirmation and a prior prepare_publish result to publish or schedule a Dreamlit workflow. Side effect: installs live database/repeating/auth triggers, schedules or sends broadcasts, and may enable notification delivery; sandbox mode can hold notifications for inspection. Returns the published workflow status and app URLs. Do not call speculatively or without carrying forward the prepare_publish safety fields.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Confirm publish",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": true
}
}Use after explicit user intent to unpublish a Dreamlit workflow. Side effect: disables live triggers or schedules so no new runs start. Runs already in progress keep sending unless inProgressRuns is "stop". If the workflow has in-progress runs and inProgressRuns is omitted, returns clarification_required with the count and changes nothing: ask the user whether to stop those runs or let them finish, then call again with their choice. Returns updated workflow status, stopped run counts (allRunsStopped, remainingRunCount), and app URLs. If some runs could not be stopped, ask the user, then call again with inProgressRuns "stop": on an already-unpublished workflow it only stops the runs still in progress. Do not use for deleting drafts, canceling one broadcast run, or editing workflow content.
| Parameter | Type | Description |
|---|---|---|
| workflowId * | string | Workflow id to unpublish and disable live triggers or schedules. |
| inProgressRuns | string | What happens to runs already in progress, including runs waiting at a wait step. "stop" stops them so they send nothing more; "let_finish" lets them keep going and send. Required when the workflow has in-progress runs: ask the user, then call again with their choice. On an already-unpublished workfl… |
{
"name": "unpublish_workflow",
"title": "Unpublish workflow",
"description": "Use after explicit user intent to unpublish a Dreamlit workflow. Side effect: disables live triggers or schedules so no new runs start. Runs already in progress keep sending unless inProgressRuns is \"stop\". If the workflow has in-progress runs and inProgressRuns is omitted, returns clarification_required with the count and changes nothing: ask the user whether to stop those runs or let them finish, then call again with their choice. Returns updated workflow status, stopped run counts (allRunsStopped, remainingRunCount), and app URLs. If some runs could not be stopped, ask the user, then call again with inProgressRuns \"stop\": on an already-unpublished workflow it only stops the runs still in progress. Do not use for deleting drafts, canceling one broadcast run, or editing workflow content.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to unpublish and disable live triggers or schedules."
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string",
"description": "What happens to runs already in progress, including runs waiting at a wait step. \"stop\" stops them so they send nothing more; \"let_finish\" lets them keep going and send. Required when the workflow has in-progress runs: ask the user, then call again with their choice. On an already-unpublished workflow, \"stop\" stops the runs still in progress."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"result"
],
"properties": {
"result": {
"oneOf": [
{
"type": "object",
"required": [
"status",
"data"
],
"properties": {
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"status": {
"type": "string",
"const": "success"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"auth": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"status": {
"type": "string",
"const": "auth_required"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"clarification"
],
"properties": {
"status": {
"type": "string",
"const": "clarification_required"
},
"clarification": {
"anyOf": [
{
"type": "object",
"required": [
"message",
"workflowId",
"projectId",
"orgId",
"chatSessionId",
"userMessageId",
"assistantMessageId",
"appUrls"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"workflows"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"chatSessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"assistantMessageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"testableMessages",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "test_message_selection"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"testableMessages": {
"type": "array",
"items": {
"type": "object",
"required": [
"testTargetId",
"messageType",
"label",
"requiresRecipient"
],
"properties": {
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"destination": {
"type": "string"
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string"
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requiresRecipient": {
"type": "boolean"
}
},
"additionalProperties": false
},
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"workflowId",
"projectId",
"orgId",
"inProgressRunCount",
"options",
"appUrls"
],
"properties": {
"kind": {
"type": "string",
"const": "unpublish_in_progress_runs"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"inProgressRuns",
"label",
"recommended"
],
"properties": {
"label": {
"type": "string"
},
"recommended": {
"type": "boolean"
},
"inProgressRuns": {
"enum": [
"stop",
"let_finish"
],
"type": "string"
}
},
"additionalProperties": false
}
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inProgressRunCount": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"message",
"projectId",
"orgId",
"questions",
"instructions",
"retry"
],
"properties": {
"kind": {
"type": "string",
"const": "project_context"
},
"orgId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"retry": {
"type": "object",
"required": [
"action",
"note"
],
"properties": {
"note": {
"type": "string"
},
"action": {
"enum": [
"create_or_update_workflow",
"prepare_publish"
],
"type": "string"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"projectId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"questions": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"question",
"lookFor",
"askPersonFor",
"why"
],
"properties": {
"why": {
"type": "string"
},
"field": {
"enum": [
"goalMetric",
"currentMoment",
"segments",
"otherSenders"
],
"type": "string"
},
"lookFor": {
"type": "string"
},
"question": {
"type": "string"
},
"askPersonFor": {
"type": "string"
}
},
"additionalProperties": false
},
"minItems": 1
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"instructions": {
"type": "string"
},
"knownToDreamlit": {
"type": "object",
"properties": {
"candidateColumns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Columns in the connected database that may split customers into groups (table.column)."
},
"recentBroadcasts": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"scheduledAt"
],
"properties": {
"name": {
"type": "string"
},
"scheduledAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"description": "Recent broadcasts sent through Dreamlit."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"confirmation"
],
"properties": {
"status": {
"type": "string",
"const": "confirmation_required"
},
"confirmation": {
"anyOf": [
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "publish"
},
"input": {
"type": "object",
"required": [
"workflowId"
],
"properties": {
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id to publish."
},
"isSandboxed": {
"type": "boolean",
"description": "Whether to publish in sandbox mode so notifications are held for inspection."
},
"expectedUpdatedAtIso": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
],
"description": "Workflow updatedAt timestamp returned by prepare_publish, used as a safety check."
},
"expectedEditableVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Editable version id returned by prepare_publish, used as a safety check."
},
"expectedPublishedVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "Published version id returned by prepare_publish, used as a safety check."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "confirm_publish"
},
"sender": {
"type": "object",
"required": [
"usesSharedSender",
"address",
"allowance",
"estimatedEmails",
"domain"
],
"properties": {
"level": {
"enum": [
"info",
"low",
"empty",
"blocked"
],
"type": "string"
},
"domain": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "null"
},
"state": {
"type": "string",
"const": "none"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "pending"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"name"
],
"properties": {
"name": {
"type": "string"
},
"state": {
"type": "string",
"const": "verified"
}
},
"additionalProperties": false
}
]
},
"address": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"allowance": {
"anyOf": [
{
"type": "object",
"required": [
"used",
"limit",
"remaining",
"window",
"resetsAt"
],
"properties": {
"used": {
"type": "number"
},
"limit": {
"type": "number"
},
"window": {
"enum": [
"month",
"day"
],
"type": "string"
},
"resetsAt": {
"type": "string"
},
"remaining": {
"type": "number"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"estimatedEmails": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"usesSharedSender": {
"type": "boolean"
}
},
"additionalProperties": false
},
"appUrls": {
"type": "object",
"required": [
"workflow"
],
"properties": {
"workflow": {
"type": "string",
"format": "uri"
},
"addDomain": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"kind",
"action",
"input",
"message",
"previewUrl",
"appUrls",
"summary",
"warnings"
],
"properties": {
"kind": {
"type": "string",
"const": "send_workflow_test"
},
"input": {
"type": "object",
"required": [
"workflowId",
"confirmSend"
],
"properties": {
"rowData": {
"type": "object",
"description": "Optional sample data for rendering draft message variables during the test. If omitted, Dreamlit uses the same default preview data as the web builder when available.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"workflowId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Workflow id whose editable draft message should be tested."
},
"confirmSend": {
"type": "boolean",
"const": true
},
"messageType": {
"enum": [
"email",
"slack"
],
"type": "string",
"description": "Optional message type filter when selecting a draft message to test."
},
"testTargetId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Structured test target id from testableMessages. Do not show this id to users; ask them to choose by message label."
},
"testRecipientEmail": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Optional recipient for email tests. If omitted, Dreamlit sends to the authenticated user's email address."
}
},
"additionalProperties": false
},
"action": {
"type": "string",
"const": "send_workflow_test"
},
"appUrls": {
"type": "object",
"required": [
"workflow",
"preview"
],
"properties": {
"preview": {
"type": "string",
"format": "uri"
},
"workflow": {
"type": "string",
"format": "uri"
},
"workflows": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"message": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"type": "string"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"previewUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"handoff"
],
"properties": {
"status": {
"type": "string",
"const": "handoff_required"
},
"handoff": {
"type": "object",
"required": [
"kind",
"reason",
"message",
"url",
"instructions"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"kind": {
"type": "string",
"const": "browser"
},
"reason": {
"type": "string"
},
"blocker": {
"type": "object",
"required": [
"code",
"detail",
"appliedActionCount"
],
"properties": {
"code": {
"enum": [
"step_needs_detail",
"step_not_editable",
"step_not_built",
"request_unclear"
],
"type": "string",
"description": "step_needs_detail: answer `detail` in a follow-up create_or_update_workflow call with the same workflowId. step_not_editable: change a different step instead. step_not_built: retry once, then finish in the browser. request_unclear: describe the change in more detail and retry."
},
"detail": {
"type": "string",
"description": "The specific missing detail or blocking rule, in plain language."
},
"stepType": {
"enum": [
"database_trigger",
"broadcast_trigger",
"repeating_trigger",
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"appliedActionCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"description": "Why Dreamlit stopped before finishing the draft. Changes counted in appliedActionCount are already saved.",
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"stepId",
"stepType",
"change"
],
"properties": {
"change": {
"enum": [
"added",
"updated",
"removed"
],
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "updated only: the config fields that changed, such as query, rowFilter, slackTemplate, or emailTemplate.html. parent means the step moved."
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"DATABASE_TRIGGER",
"SUPABASE_AUTH_TRIGGER",
"BROADCAST_TRIGGER",
"REPEATING_TRIGGER",
"WAIT",
"QUERY",
"SEND_EMAIL",
"SEND_SLACK",
"UNKNOWN"
],
"type": "string"
}
},
"description": "A step this call saved to the draft, read from the draft after the call.",
"additionalProperties": false
},
"description": "create_or_update_workflow: the steps already saved to the draft before Dreamlit stopped."
},
"message": {
"type": "string"
},
"instructions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"code": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string",
"const": "error"
},
"appUrls": {
"type": "object",
"required": [
"addDomain"
],
"properties": {
"addDomain": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"format": "uri",
"description": "Guide or support contact for resolving the problem in the message."
},
"message": {
"type": "string"
},
"resetAt": {
"type": "string",
"description": "quota_exceeded: when this month's AI usage resets (ISO 8601)."
},
"requestId": {
"type": "string",
"description": "dreamlit_error: a reference for this failure. Give it to the user if it keeps failing."
},
"retryable": {
"type": "boolean",
"description": "dreamlit_error: the same call can work if tried again later."
},
"stepEdits": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"stepId",
"status",
"changedFields"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"enum": [
"step_not_found",
"step_not_editable",
"field_not_for_step_type",
"duplicate_step",
"invalid_value",
"query_failed",
"query_drops_used_fields",
"related_edit_failed",
"save_failed"
],
"type": "string",
"description": "step_not_found: get fresh step ids from get_workflow_and_preview_url. step_not_editable: triggers can't be edited here; use create_or_update_workflow. field_not_for_step_type: send only fields for that step's type. duplicate_step: combine edits to one step. invalid_value: fix the value as the message says. query_failed: fix the SQL. query_drops_used_fields: keep returning fields, or edit the steps that use them in the same call. related_edit_failed: a related edit in this call (a SQL edit above or below this step) failed; fix it and send both again. save_failed: try again."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "query_drops_used_fields: fields later steps still use that the new query no longer returns."
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"index": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Position of the edit in the request."
},
"status": {
"enum": [
"applied",
"failed"
],
"type": "string"
},
"stepId": {
"type": "string"
},
"stepType": {
"enum": [
"query",
"wait",
"email",
"slack"
],
"type": "string"
},
"stepTitle": {
"type": "string"
},
"changedFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"description": "edit_workflow_steps: what happened to each edit when none could be applied."
},
"billingUrl": {
"type": "string",
"format": "uri",
"description": "quota_exceeded or plan_upgrade_required: page where a workspace admin can buy AI credits or upgrade the plan."
},
"unreadableTables": {
"type": "array",
"items": {
"type": "object",
"required": [
"schema",
"table",
"fixSql"
],
"properties": {
"table": {
"type": "string"
},
"fixSql": {
"type": "string"
},
"schema": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "table_rows_hidden_by_rls: tables Dreamlit can see but not read rows from, each with fixSql that adds Dreamlit's read policy. Run fixSql, or ask the user to run it, in the Supabase SQL editor, then try again."
},
"retryAfterSeconds": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
}
],
"description": "Dreamlit MCP result. success responses contain data and appUrls when relevant; auth_required, clarification_required, confirmation_required, handoff_required, and error responses explain the next action."
}
},
"additionalProperties": false
},
"annotations": {
"title": "Unpublish workflow",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": true
}
}Dreamlit is a database-driven notification workflow platform for Supabase and Postgres apps. Prefer outcome-oriented prompts: describe the event or schedule, audience, recipient, message goal, timing, business rules, and unsubscribe intent. Dreamlit keeps a read-only history of the email it sends. Workflows can use it to target by opens or clicks and to skip people a workflow already emailed in a period, so the user's database rarely needs a notified-at column. It filters by history; it does not guarantee exactly-once delivery. Use get_status for workspace, project, setup, and prompting context before authoring. Not sure Dreamlit fits the app's database? Call check_compatibility; it works before sign-in. Dreamlit works with Postgres (including Supabase and Neon). Not signed in yet (a Dreamlit tool fails with an authorization error, or get_status says signedIn is false): Tell the user, in one message, how to sign in. Someone new to Dreamlit first signs up at https://dreamlit.ai/signup?from=<tool> (claude-code, codex or cursor: the tool you're running in; leave ?from off for any other), then comes back; someone with an account skips that. Then, from this AI agent, in Claude Code: "Type /mcp, choose dreamlit, then Authenticate." (Claude Code doesn't open the browser by itself, and if dreamlit isn't listed, they quit and run claude --continue first.) Other agents show a sign-in or Needs login button next to dreamlit. The browser asks them to click Allow. Claude Code waits 5 minutes for the browser; if it shows "Authentication timeout", they choose Authenticate again (signed in by then, and if they already clicked Allow it connects without asking again). Then call get_setup_status. Before reading the app yourself, look for lifecycle-email-audit/context.json in the repo, saved by the free lifecycle email audit. If it's there and its generatedAt is less than 14 days old, send its update_project object to update_project and its share_app_context object to share_app_context as they are, and tell the user in a line that you're using the audit they ran on that date. If a call rejects a field, fix only that field from the repo. If the file is missing or older, read the app as usual. Right after sign-in, fill in what you can from the repo with update_project (name, product description, goals, website, stack, and the brief: goal, what's happening now, who counts, other senders) and tell the user briefly what you assumed. You can read the code, schema and your other tools, so look things up before asking the user. Then call get_app_context_request and follow it: describe the app's schema and how its onboarding works with share_app_context. Then call get_setup_status and ask the person to connect their database on its setup page. Setup ends when get_setup_status reports it complete. After setup is complete, say in one sentence that previews and tests send from Dreamlit's address and they can add their domain before going live, then offer the first email: Build the first workflows one at a time: the changes the lifecycle email audit named, in its order (the project's intendedUseCase lists them, and lifecycle-email-audit/report-data.json in the repo has each one's audience and timing when it's there). Without an audit, start with a nudge for users who signed up but got stuck. For each, call create_or_update_workflow with the event or schedule, the audience and the goal, then get_workflow_and_preview_url and share the preview link so the user sees the real email with real data. Before the first publish, when prepare_publish says the workflow uses Dreamlit's address and the project has no sender domain, offer two choices once: use their domain, or publish on Dreamlit's address with the allowance and effective daily or monthly limit returned by prepare_publish. For their domain, call configure_sender_domain with the domain from the project website; add the DNS records only if you have a DNS tool and the user agrees, otherwise share the settings li
Names, descriptions and schemas were written by the server and are shown as data.