Set Pterodactyl server power state
ptero_set_power_stateControl a Pterodactyl game server's power state: start, stop, restart, or kill the process, with confirmation and rate limiting for safe operation.
Instructions
Send a power signal to the server. start boots it from offline. stop gracefully shuts it down, saving the world first, and disconnects any connected players. restart stops then starts it again, briefly disconnecting players. kill forcibly terminates the process immediately, without saving.
kill is a hard stop and risks world corruption: prefer stop in almost every case, and reach for kill only when the server is hung and unresponsive to a normal stop. kill additionally refuses to run unless PTERODACTYL_ALLOW_KILL=true is set, and when it does proceed an automatic backup is taken first (the kill is aborted if that backup fails).
stop, restart and kill are destructive and require explicit human confirmation before they run — via MCP elicitation where the client supports it, otherwise a two-phase confirmation_token. On the first call (no token) nothing changes: you get back a preview of the current state and what the signal will do. THIS PREVIEW IS FOR THE HUMAN — show it in your reply and wait for their decision; do not silently call the tool again with the token yourself. Only call again, with the same arguments plus confirmation_token, once the human has approved it. start needs no confirmation.
Power actions are rate-limited to one per 30 seconds regardless of signal, to stop restart loops — a second power call inside that window is refused, naming how long to wait.
Set wait_seconds (0-60, default 0) to poll the live power state every 2 seconds after the signal is dispatched and report it back as state_after, instead of returning immediately with only the signal that was sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Server short identifier (e.g. 1a2b3c4d). Omit to use PTERODACTYL_DEFAULT_SERVER. Call ptero_list_servers to discover valid identifiers. | |
| signal | Yes | Power signal to send. start = boot; stop = graceful shutdown (disconnects players); restart = stop then start (disconnects players); kill = hard-kill the process (risks world corruption — prefer stop). | |
| dry_run | No | When true, validate and preview the change without performing it. Nothing is modified and no confirmation token is issued. Use this to reason about an operation before committing to it. | |
| wait_seconds | No | After dispatching the signal, poll the power state every 2 seconds for up to this many seconds (0-60, default 0 = do not wait) and report the final state as `state_after`. | |
| confirmation_token | No | Two-phase confirmation token. Leave this out on the first call: the tool will refuse to act and instead return a preview of exactly what would change, plus a single-use token that expires in 120 seconds. THE PREVIEW IS FOR THE HUMAN — show it to the user in your reply and let them decide. Do not silently round-trip the token back in an immediate second call. Only call again with the token once the user has seen the preview and approved it. The token is bound to a hash of these exact arguments, so changing any argument invalidates it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the call was refused. | |
| server | Yes | ||
| signal | No | The power signal that was sent. Present only on `status: "success"`. | |
| status | Yes | success = the change was made. refused = a guardrail blocked it (see reason/variable). dry_run = nothing changed; preview shows what would. needs_confirmation = nothing changed; SHOW the preview to the human and, only if they agree, call again with confirmation_token. | |
| message | No | ||
| preview | No | What would / did change. | |
| variable | No | Environment variable that caused the refusal. | |
| backup_id | No | UUID of the automatic pre-change backup, if one was taken. | |
| state_after | No | Daemon power state after polling for `wait_seconds`. Only present when `wait_seconds` was greater than 0. | |
| expires_in_s | No | ||
| confirmed_via | No | ||
| previous_state | No | Daemon power state captured immediately before the signal was dispatched (offline/starting/running/stopping/unknown). Present only on `status: "success"`. | |
| confirmation_token | No |