Skip to main content
Glama

service_action

Manage service lifecycle across Linux hosts: restart, start, stop, update, or recreate in rolling batches. Dry-run first; apply the exact plan hash to confirm the service is back up.

Instructions

restart / start / stop / update (compose pull + up -d) / recreate a service on hosts — a compose project, systemd unit or container from the inventory (remnanode, certbot, remnawave, tailscaled, fail2ban, node_exporter, docker … or your own). Rolling by default (batch 1 for disruptive actions), verified: the service must be up again.

Input Schema

NameRequiredDescriptionDefault
applyNofalse (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash
batchNohosts at a time (rolling). Default depends on the action: 1 for disruptive ones
actionYes
targetNohosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludesall
serviceYesservice name (fleet_hosts details:true lists them)
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since
continueOnErrorNokeep going after a host fails (default: stop the rollout at the first failure)
skipUnreachableNoskip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: rolling by default, batch size 1 for disruptive actions, and post-action verification that the service must be up again. It stops short of disclosing the dry-run/apply workflow and the consequence of a failed rollout, which the schema hints at.

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?

Two dense sentences, front-loaded with the verb list and scope. The long parenthetical inventory example is informative but slightly bloats the sentence; overall it stays efficient with minimal waste.

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

Completeness4/5

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

For an 8-parameter mutation tool with no output schema, the description covers scope, strategy, and verification adequately. It is not fully complete because the dry-run-then-apply contract and failure mode are left entirely to the schema.

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 88%, so the schema already documents almost every parameter including the apply/planHash fingerprint workflow. The description adds only a partial gloss (update = compose pull + up -d, service list sources from inventory), which is useful but not beyond the schema baseline.

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 (restart/start/stop/update/recreate) applied to a clear resource (a service), and enumerates what counts as a service: a compose project, systemd unit, or container from the inventory. An agent can distinguish this from siblings like host_reboot or remnanode_update 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 Guidelines3/5

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

The description conveys operating intent (rolling default, batch 1 for disruptive actions, verified up again) but never says when to choose this over siblings such as host_reboot, remnanode_update, or host_exec, nor any preconditions. Usage is implied through the action list rather than stated.

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