Publish an app at a public address
publish_appPublish a web app running in the sandbox at a permanent public HTTPS address https://. – no token, anyone can open it. Start and test the app first (listening on 0.0.0.0:, running in the background). Pass start_command (and cwd): the plain command that runs the app, e.g. python3 app.py – it is started in the background whenever a visitor comes and nothing listens on the port (after a wake-up without memory). A published sandbox is not deleted after the retention period; without visitors it sleeps and the next visitor wakes it (a few seconds). Calling it again with the same name updates the app. Optional domain adds the user's own domain (tell the user the DNS record from the answer). Only for paying accounts; do not publish login pages of other services, payment forms or anything harmful.
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": {
"name": "<name>",
"port": "<port>"
},
"name": "publish_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional: working directory for start_command, e.g. /home/user/app | |
| name | Yes | Address name: 3–40 lowercase letters, digits and hyphens (becomes https://<name>.<zone>). Must be free. | |
| port | Yes | TCP port the app listens on in the sandbox (1–65535) | |
| domain | No | Optional: the user's own domain for the app, e.g. booking.example.com. The answer tells which DNS record the user must create; the HTTPS certificate is then issued automatically. | |
| sandbox_id | No | Sandbox ID (sb_…). If omitted, the current sandbox of this session is used. A sandbox_id you pass becomes the current sandbox for later calls without sandbox_id. | |
| start_command | No | Command that starts the app, e.g. `python3 app.py` or `npm start` (run in the background when needed). Strongly recommended. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public HTTPS address of the app – no token. | |
| name | Yes | App name (the address is https://<name>.<zone>). | |
| port | Yes | TCP port of the app in the sandbox. | |
| domain | No | The own domain, when domain was given: domain, state (pending, issuing, active) and dns – the records the user must create. | |
| sandbox_id | Yes | Sandbox ID. | |
| domain_error | No | Why the own domain could not be added (the app is published anyway). | |
| start_command | No | Command that starts the app after a wake-up without memory (empty = none). |