Skip to main content
Glama
PainInTheNic

ubuntu-mcp-server

by PainInTheNic

Manage Service

ubuntu_manage_service
Destructive

Start, stop, restart, reload, enable, or disable systemd services on Ubuntu servers remotely over SSH, with confirmation of service state after the action.

Instructions

Start, stop, restart, reload, enable, or disable a systemd service. Runs via 'sudo -n', so the server must allow passwordless sudo for the configured user.

Args:

  • server (string): server name from the inventory (see ubuntu_list_servers)

  • service (string): unit name, e.g. 'nginx'

  • action ('start' | 'stop' | 'restart' | 'reload' | 'enable' | 'disable'): what to do

Returns: confirmation plus the service's state after the action.

Error handling: if sudo requires a password the error explains how to configure passwordless sudo. 'reload' fails for services that don't support it — use 'restart' instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform on the service
serverYesServer name from the inventory (see ubuntu_list_servers)
serviceYessystemd unit name, e.g. 'nginx' or 'nginx.service'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
serverYes
serviceYes
state_afterYes
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses the sudo -n requirement, the return format (confirmation plus service state), and error handling specifics (password sudo errors, reload failure). This provides substantial behavioral context that helps the agent anticipate side effects and troubleshoot failures.

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

Conciseness5/5

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

The description is well-structured: a clear introductory line, an Args list, a Returns note, and an Error handling section. Each sentence adds necessary information without redundancy or fluff.

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?

The description covers prerequisites (passwordless sudo), all supported actions, return behavior, and common failure scenarios. Given the presence of an output schema and complete schema documentation, the description is fully sufficient for the agent to select and use the tool correctly.

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 coverage is 100%, so the parameters are already well-documented. The description repeats the parameter meanings and adds minimal examples (e.g., 'nginx'), but does not introduce new semantic information beyond the schema. Baseline 3 is appropriate.

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?

The description opens with 'Start, stop, restart, reload, enable, or disable a systemd service' – a specific verb+resource pairing that clearly states the tool's purpose. It distinguishes itself from sibling read-only tools like ubuntu_service_status and ubuntu_list_services by focusing on state-changing operations.

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

Usage Guidelines4/5

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

The description provides clear context on how to invoke the tool (requires passwordless sudo), and includes explicit guidance on 'reload' failing for unsupported services with the recommendation to use 'restart' instead. It does not explicitly name alternative tools for when not to use it, but the context is sufficiently clear to infer appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PainInTheNic/MCP-Ubuntu'

If you have feedback or need assistance with the MCP directory API, please join our Discord server