Skip to main content
Glama

services/manage

Destructive

Control one systemd service: start, stop, restart, reload, enable, or disable it over D-Bus. Requires root privileges via polkit grant.

Instructions

Starts, stops, restarts, reloads, enables or disables ONE systemd service over D-Bus (.service is appended when missing). Mutating. Ordinary users are usually refused by polkit, so privileged: true (needs a grant in mcp-sudo.yaml) is normally required. start, stop, restart and reload wait for the systemd job and return Job N completed with status: done (or failed, canceled, timeout, dependency, skipped); a slow one can hit the 30 s worker limit. reload asks the service to re-read its config without stopping it, only if the unit supports it. enable and disable only change whether it starts at boot; they do not start or stop it. To see state use services/list or the service://<name>/status resource, for logs logs/journal-control, for containers docker/manage, for a raw signal to a PID processes/delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesstart, stop, restart and reload wait for the systemd job; enable and disable only change start at boot
serviceYesUnit name; '.service' is appended if missing (e.g. 'kubelet' or 'kubelet.service')
privilegedNoRun as root. Normally required (polkit); needs a grant for this tool in mcp-sudo.yaml

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.1
    • changedInput schema / properties / action / description
      Previous value: -"Action to perform on the service"New value: +"start, stop, restart and reload wait for the systemd job; enable and disable only change start at boot"
    • changedInput schema / properties / privileged / description
      Previous value: -"Run as root"New value: +"Run as root. Normally required (polkit); needs a grant for this tool in mcp-sudo.yaml"
    • changedInput schema / properties / service / description
      Previous value: -"Service name (e.g., 'kubelet.service')"New value: +"Unit name; '.service' is appended if missing (e.g. 'kubelet' or 'kubelet.service')"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=true, idempotentHint=false), but the description adds substantial context beyond them: polkit refusals, the privileged grant requirement, job-waiting behavior with concrete completion statuses, the 30 s worker timeout, and the semantic distinction between reload and enable/disable. This is exactly the behavioral detail that annotations cannot express.

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 core verb set and scope before branching into prerequisites, return semantics, and sibling routing. It is dense and every clause carries information, though the run-on middle section could be split for easier scanning.

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 3-parameter mutating tool with no output schema, the description covers the full operational picture: permission prerequisites, job-completion outcomes, timeout risk, action-specific semantics, and where to go for adjacent needs. Nothing an agent needs to call it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the enum values and the '.service' append rule are already documented in the schema itself. The description restates those semantics (reload re-reads config only if supported; enable/disable only affect boot) with little that the schema does not already provide, so the baseline 3 applies.

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 specific verbs (starts, stops, restarts, reloads, enables, disables) against a specific resource (ONE systemd service over D-Bus). It further disambiguates scope with the '.service is appended when missing' detail, so an agent can distinguish it from services/list or process control siblings without opening the schema.

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 routes to alternatives by intent: services/list or the service://<name>/status resource for state, logs/journal-control for logs, docker/manage for containers, processes/delete for raw signals to a PID. It also states the normal prerequisite (privileged: true with an mcp-sudo.yaml grant) rather than leaving it to inference.

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