host-restart
Restart services on a database host through a gated, auditable operation that uses inventory credentials, maintenance windows, confirmations, and a recorded reason.
Instructions
dbabrain common.cli host-restart: A gated action on a host: facts, a service, a restart.
server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
target: The machine or instance: a server_id, or
<db_type> <ip>[:port].access: An inline cmd_access, for a host outside the inventory.
platform: windows | linux, when the inventory does not say.
action: host-service: status | start | stop | restart.
services: host-service: which services.
wait: Wait for the end state.
window: The maintenance window it must fall in.
ignore_window: Run outside that window, deliberately.
overrides: Blocking gates accepted on purpose.
evidence: Where to write the evidence file.
sudo: Run through sudo on Linux.
dry_run: Plan only: change nothing.
confirm: The payload declares the operator agreed.
assume_yes: Unattended: take the typed yes as given.
authorized_by: Who approved it, for example {"channel": "telegram"}.
reason: Why, for the evidence.
policy: The maintenance policy that times this host operation: the node's maintenance_policy.json defaults with this server's own values over them. {} means the built-in defaults. The app that calls fills it from its own data...
rules: What the operation costs to confirm: {level, confirmations, challenge, effects} - the node's own emergency_operations.json entry for it. Absent, the ladder the package ships prices it; malformed, it is refused rather ...
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "host-restart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |