Skip to main content
Glama

Restart / Start / Stop a Host Service

service_action
Destructive

Restarts, starts, or stops Unraid services (Samba, NFS, SSH, Docker, libvirt, Tailscale) over SSH, then checks and reports the resulting status instead of assuming success.

Instructions

⚠ Runs /etc/rc.d/rc.<service> restart|start|stop over SSH for samba, nfs, sshd, docker, libvirt, or tailscale, then reads the status back and reports it (never assumes success). restart is the normal use. stop additionally requires allow_stop: true because stopping samba/nfs cuts every client off their shares (and stopping sshd cuts off this very tool); stopping docker or libvirt is refused outright — use array_action or the web UI. Requires confirm: true AND acknowledge_risk: true, plus SSH. Check current state with service_list.

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": {
      "service": "<service>",
      "action": "<action>"
    },
    "name": "service_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesrc.d verb to run. `stop` also needs `allow_stop: true` and is always refused for docker and libvirt.
confirmNoSet `true` only after the user approves this specific change; otherwise the tool refuses or prompts them.
serviceYesHost service to control (samba = SMB shares, libvirt = VMs); current state comes from service_list.
allow_stopNoSet `true` only after the user accepts every client of the service being cut off; needed for `stop`.
response_formatNo`detailed` returns full JSON instead of readable text.concise
acknowledge_riskNoSet `true` only after the user accepts the service being interrupted for its clients; needed for every action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.3
    • addedInput schema / properties / acknowledge_risk / description
      Added value: +"Set `true` only after the user accepts the service being interrupted for its clients; needed for every action."
    • addedInput schema / properties / action / description
      Added value: +"rc.d verb to run. `stop` also needs `allow_stop: true` and is always refused for docker and libvirt."
    • addedInput schema / properties / allow_stop / description
      Added value: +"Set `true` only after the user accepts every client of the service being cut off; needed for `stop`."
    • addedInput schema / properties / confirm / description
      Added value: +"Set `true` only after the user approves this specific change; otherwise the tool refuses or prompts them."
    • addedInput schema / properties / response_format / description
      Added value: +"`detailed` returns full JSON instead of readable text."
    • addedInput schema / properties / service / description
      Added value: +"Host service to control (samba = SMB shares, libvirt = VMs); current state comes from service_list."
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the destructiveHint annotation: discloses the SSH transport, that status is read back and success is never assumed, the blast radius of stopping samba/nfs (all clients cut off) and sshd (this tool itself), the refusal for docker/libvirt, and the confirm + acknowledge_risk gate. That is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the warning and the concrete command, then the safety constraints, then the sibling pointer. Dense but no filler; the stacked parentheticals make it slightly harder to scan than it could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, multi-parameter action tool with no output schema, everything an agent needs is present: mechanism, allowed services, refusal cases, required safety flags, and an explicit note that status is verified and reported back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: `stop` is gated by `allow_stop`, and every action requires both `confirm` and `acknowledge_risk`. It also clarifies the operational consequence behind those flags rather than just restating them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set (restart/start/stop), the exact resource (a host rc.d service), the concrete mechanism (`/etc/rc.d/rc.<service> ... over SSH`), and enumerates the six controllable services. An agent can immediately distinguish this from service_list (read-only status) or array_action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says `restart` is the normal use, that `stop` needs `allow_stop: true`, that stopping docker/libvirt is refused and should go through array_action or the web UI instead, and to check current state with service_list first. Use, exclusions, and alternatives are all named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.