Update project settings
update_settingsChange the settings of one project. Send project_id and only the fields to change; a field left out keeps its current value. Returns ok and a short message.
Build settings (ref, framework, runtime_version, build_cmd, dependencies_cmd, sub_path, output_directory) apply to the next build. port and health_check_path restart the running app. storage_mount_path applies on the next deploy. display_name renames the project.
Visibility: default_public sets whether commits created later are public or owner-only; existing commits keep their visibility. auto_promote_on_main_build sets whether a successful build of the tracked ref becomes the production version automatically.
Sign-in gate: google_login ('on' or 'off') puts the platform's Google sign-in in front of the app's canonical host, or removes it, and applies to the live host immediately. google_login_mode and google_login_allowed_emails set who may pass and also apply immediately; removing an address ends that person's access on their next request.
Bots and timers: an idle app is paused and only an incoming request wakes it, so an app cannot keep its own chat connection (discord.py client.run, discord.js client.login, Telegram polling, Slack Socket Mode) or run its own timers (node-cron, APScheduler, setInterval). Declare them and the platform calls the app instead. A call the platform makes itself (a timer, a gateway event) carries 'Authorization: Bearer <KAD_PLATFORM_TOKEN>' (an env var the platform sets), which the handler must check.
crons: the platform sends POST /__kad/cron/ at each time. Answer 2xx within 85 s. A run is never repeated, and one can be missed.
bot, mode 'webhook' (default; Discord slash commands and buttons, Telegram, Slack Events): the chat platform calls the app's public URL at bot.path. For discord and telegram the platform registers that URL when a commit is live, and for discord also bot.commands; it sets DISCORD_PUBLIC_KEY, and the handler must verify the Ed25519 signature, answer PING with {"type":1} and answer in 3 s (or defer with type 5). For telegram the handler compares the X-Telegram-Bot-Api-Secret-Token header with KAD_WEBHOOK_SECRET (set by the platform). The app must be public.
bot, mode 'gateway' (discord bots that read normal messages): the platform holds the connection and sends each event listed in bot.events as POST /__kad/bot/events with JSON {platform, type, seq, data}; the app replies through the chat platform's REST API with its own token. Delivery is at least once: use the X-Kad-Event-Id header to skip repeats. No voice.
Long tasks: a handler that keeps working after it answered is paused after about 90 s without a new request. When the env var KAD_BUSY_URL is set, POST {"seconds": N} to it with the KAD_PLATFORM_TOKEN Bearer to stay awake (at most 900 s per call, with a daily budget), and {"seconds": 0} when the work is done. The bot token is an env var: set it with set_env_vars and give only its NAME in bot.token_env. get_settings shows the registration state and the last timer runs.
Environment variables are not changed by this tool; set_env_vars does that. Requires a read-write token.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>"
},
"name": "update_settings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bot | No | declare the app's chat bot so the platform drives it; an idle app is paused, so it cannot hold its own chat connection. See the BOTS AND TIMERS section of the server instructions. Pass platform 'none' to remove the bot | |
| ref | No | tracked branch/tag (the ref auto-promote follows) | |
| port | No | container port; change rolls the deployed pods | |
| crons | No | the app's timers; replaces the whole list, an empty list removes them. At each time the platform sends POST <path> to the live app with 'Authorization: Bearer $KAD_PLATFORM_TOKEN'; the handler must answer within 85 s | |
| sub_path | No | build sub-directory; applies to the next build | |
| build_cmd | No | build command; applies to the next build | |
| framework | No | framework preset; applies to the next build | |
| start_cmd | No | command that starts the app (presets fastapi, flask, django, node); a shell command run as /bin/sh -c with PORT set; empty string = the preset's own command; applies to the next build | |
| project_id | Yes | the project id (from list_projects) | |
| display_name | No | human-friendly project name | |
| google_login | No | 'on' gates the app's canonical host behind Google sign-in (the platform runs the OAuth flow; the app receives X-Kad-User/X-Kad-Email/X-Kad-Project headers), 'off' removes the gate. Applies to the live canonical host immediately. | |
| default_public | No | whether new commits default to public | |
| runtime_version | No | runtime version; applies to the next build | |
| dependencies_cmd | No | install command; applies to the next build | |
| output_directory | No | static output directory; applies to the next build | |
| google_login_mode | No | who gets through the Google gate: 'anyone' (any verified Google account) or 'restricted' (only google_login_allowed_emails). Takes effect immediately, no redeploy. Switching to 'restricted' with no list seeds the owner's own address so they don't lock themselves out. | |
| health_check_path | No | HTTP health-check path; change rolls the deployed pods | |
| storage_mount_path | No | absolute path where the app's persistent disk mounts, e.g. /data; empty removes it. Setting it on an app that has no disk (a new app has none) creates the disk. Applies on the next deploy | |
| auto_promote_on_main_build | No | auto-promote successful builds of the tracked ref to canonical | |
| google_login_allowed_emails | No | the email addresses allowed in 'restricted' mode; replaces the whole list. Removing an address revokes that person on their next request. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| status | No | present, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first | |
| message | Yes | ||
| plan_id | No | poll get_plan_status with this id for the eventual outcome | |
| approve_at | No | the kad.dev dashboard URL a human approves or rejects this plan from | |
| expires_in_s | No | the plan can no longer be approved after this many seconds |