Skip to main content
Glama

Restart or stop the server

restart_server
Destructive

Schedule, cancel, or trigger a Minecraft server reboot or stop with countdown warnings, world/player saves, and player disconnects; confirm first.

Instructions

restart or stop after a countdown with warnings in chat, saving every world and player first. Docker's restart policy or a start script loop starts it again (then a stop is a restart too), otherwise it stays off. One is pending at a time: scheduling replaces it, cancel calls it off, and get_server_status with include restart shows it. Everyone gets disconnected: confirm with the user first.

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": "restart_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNorestart
messageNoSaid with each warning, such as the reason
countdownSecondsNo0 goes at once

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv5.0.0
    • removedInput schema / properties / action / description
      Removed value: -"`status` reads the pending one"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "restart",
      -  "stop",
      -  "cancel",
      -  "status"
      -]New value: +[
      +  "restart",
      +  "stop",
      +  "cancel"
      +]
  2. Changed2 schema fields changedv4.2.1
    • addedInput schema / properties / action / description
      Added value: +"`status` reads the pending one"
    • addedInput schema / properties / countdownSeconds / description
      Added value: +"0 goes at once"
  3. First observedv4.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it discloses what actually happens: every world and player is saved, warnings are broadcast in chat, all players are disconnected, and exactly one action can be pending at a time. It also flags the non-obvious Docker/start-script case where a `stop` behaves like a restart, and points to `get_server_status` for observing pending state.

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?

The opening sentence front-loads the action and its effects, and each subsequent sentence adds distinct information (restart-policy caveat, single-pending override rules, confirmation warning). The parenthetical '(then a stop is a restart too)' is a bit dense but genuinely informative rather than filler.

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, three-parameter tool with no output schema, the description covers the safety-critical facts an agent needs: data is saved, players are kicked, confirmation is required, and pending state is inspectable elsewhere. Annotations already carry the destructive/host-mutating profile, so nothing essential is missing.

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 67% and the schema already documents `message` and `countdownSeconds` (including the 0 = immediate case). The description adds real meaning beyond the enum by explaining that a new schedule replaces the pending one and that `cancel` aborts it, and it ties the countdown to chat warnings.

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 names the specific actions (`restart`, `stop`, `cancel`) and the resource (the server), plus the mechanics that define the operation: a countdown with chat warnings and a world/player save first. It also distinguishes itself from `get_server_status` by naming that sibling as the way to inspect a pending action.

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?

It gives clear operating context: confirm with the user first because everyone is disconnected, use `cancel` to call off a pending action, and note that scheduling replaces the existing pending action. It stops short of explicit when-to-choose-stop-vs-restart guidance, though it explains the practical difference via Docker restart policy and start scripts.

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