Unit File Write Tool
unit_file_write_toolWrites systemd unit files, backs up any existing file it overwrites, reloads the daemon, and can optionally enable or start the new service.
Instructions
Write a new unit file for setting up a service. Backs up any file it overwrites.
Requires the host's unit directory (default /etc/systemd/system) to be bind-mounted into the container. Runs daemon-reload after writing.
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": {
"unit_name": "<unit_name>",
"content": "<content>"
},
"name": "unit_file_write_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | Start the unit after writing | |
| enable | No | Enable the unit after writing | |
| content | Yes | Full contents of the unit file | |
| unit_name | Yes | Bare unit file name (e.g. "myapp.service") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||