Manage services
serviceChange the project's services (services.json) and run them. action "set": add a service, or change one (the fields given are merged into its definition; a new one needs type web|api|worker|cron|static). Fields: dev = preview command, build, start = production command, port, healthcheck_path, env, schedule for cron, dir and spa for static. The file is validated and reloaded, and invalid definitions are refused with the reason. "remove": delete a service. "restart": restart one (or start one that was stopped). "stop": stop one preview service for a while, e.g. the dev server while a build needs its memory; it stays stopped until "restart", or until the workspace sleeps and wakes. "run": run a service's command once now and return its output (it isn't written to the service's log).
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": "<project>",
"action": "<action>",
"name": "<name>"
},
"name": "service"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dev | No | ||
| dir | No | ||
| env | No | ||
| spa | No | ||
| name | Yes | ||
| pool | No | ||
| port | No | ||
| test | No | ||
| type | No | ||
| build | No | ||
| start | No | ||
| action | Yes | ||
| backup | No | A command that writes a clean copy of a database LazyFrog doesn't manage (MariaDB, MySQL) to /data/.lazyfrog/clean/ before each snapshot | |
| project | Yes | Project slug or id. | |
| schedule | No | ||
| environment | No | restart: which environment (default preview). "production" restarts a live service, e.g. a worker that crashed. stop is the preview's only. | |
| idempotency_key | No | Any unique string; repeating a call with the same key does not repeat its effect. | |
| healthcheck_path | No |