Update server tasks
update_server_tasksBuilds the site's server tasks (the api/ folder) now and updates the preview copy, so /api/... in the preview runs the new code. Xodia also does this by itself a few seconds after a change to api/ or package.json; call it after writing or fixing a task to see at once whether it builds. The answer reads like run_check: "server tasks build passed" with the tasks and any key names not set yet, or "server tasks build failed" with each problem at file:line; fix every problem and call it again. It never touches the live site (that updates when the owner goes live). When the answer says the version would wait for a safety check, tell the user: Xodia checks some new server code before it goes live, usually within a day, and the preview works meanwhile; don't change the code to get around it. Answers server_tasks_off or server_tasks_not_on when tasks aren't on for the site: tell the owner they turn them on in Features (top menu), and don't call it again in this task. Keys and schedules are the owner's: they add each key's value in Project settings, Keys and secrets, set a schedule with Run on a schedule on the task in Features (top menu), and pause or remove it in Project settings, Server tasks. A schedule runs at an interval (every hour, 15 or 5 minutes, within the plan), every day at a time, on chosen weekdays at a time, or on a day of each month at a time, each in the time zone the owner picks. No tool sets or reads a key's value or a schedule; tell the owner the key name or the address and when it should run (for example every day at 9:00, or Mondays and Thursdays at 18:30, and the time zone).
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": {
"projectId": "<projectId>"
},
"name": "update_server_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project id from list_projects |