Skip to main content
Glama

restart_comfyui

Restart the ComfyUI server to reload custom nodes or recover a wedged job. Stops and relaunches with same config, waits for readiness, supports remote instances via ComfyUI-Manager.

Instructions

Control the lifecycle of the ComfyUI server process. Driven by the action parameter:

  • action:"restart" — Restart ComfyUI: stops the running process (capturing its config), waits for the port to free, relaunches with the same arguments, and polls the API for bounded readiness. Also works against a REMOTE/tunnelled ComfyUI (via --comfyui-url) by rebooting through ComfyUI-Manager over HTTP and polling for it to come back (requires ComfyUI-Manager present and its security level permitting the reboot). When COMFYUI_RESTART_COMMAND is set, a LOCAL restart runs that command instead of kill+relaunch — the recovery path for an externally managed install (a container, a systemd unit, a launcher) whose launch path cannot be proven from here. This is the normal way to reload newly installed custom nodes, and the escalation when queue (action:"cancel") reports a job WEDGED.

  • action:"start" — Start ComfyUI using process info saved from a previous action:"stop" call. Supports both Desktop app and manual Python installs. Polls the API for bounded readiness before reporting ready. Local installs only.

  • action:"stop" — Stop the running ComfyUI process. Captures process info so it can be restarted with action:"start". Kills the process tree and resets the WebSocket client. Local installs only. Anything queued or rendering is lost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich process operation to perform. None of them takes any other parameter. "restart" stops and relaunches in one call (and is the only action that also works against a remote/tunnelled ComfyUI); "start" relaunches from the info a previous "stop" saved; "stop" kills the running process tree.
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

With zero annotations, the description carries full burden and delivers: it discloses destructive behavior ('Kills the process tree', 'Anything queued or rendering is lost'), operational sequencing (captures config, waits for port free, polls for bounded readiness), and preconditions ('requires ComfyUI-Manager present and its security level permitting the reboot'). This level of side-effect and failure disclosure is exemplary for a mutation tool.

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

Conciseness3/5

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

The description is logically organized by action and front-loaded with 'Control the lifecycle of the ComfyUI server process', but it is dense, with deeply nested clauses and a bulky middle paragraph on the restart path that mix remote behavior, env vars, and recovery rationale. The leading dash and double-hyphen formatting is also slightly awkward. It earns its length better than most, but tighter scoping would help scannability.

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 a side-effecting control tool with three actions, local/remote differences, an env-var override, and a reference to the sibling 'queue' tool, the description covers the operational surface remarkably well: prerequisites, side effects, failure modes, and boundaries (bounded readiness, local-only for start/stop). The only gap is that no return/response format is described, though for a fire-and-forget process control tool this is a minor omission.

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 100% for the single 'action' parameter, so the 3-baseline applies, but the description goes well beyond the schema by explaining consequences of each enum value (remote vs local applicability, state persistence across stop/start, readiness polling) and the environment-variable override behavior. The schema's own param description is also solid, making this a well-covered parameter end-to-end.

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 a specific verb+resource — 'Control the lifecycle of the ComfyUI server process' — and enumerates three clearly bounded actions (restart, start, stop) with distinct behavioral contracts. The trigger conditions (reload custom nodes, WEDGED job escalation, externally managed installs) distinguish this lifecycle tool from siblings like 'queue' or 'comfy_cli' without needing to name them all.

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 frames when each action is appropriate: restart is 'the normal way to reload newly installed custom nodes' and 'the escalation when queue (action:"cancel") reports a job WEDGED', explicitly naming the sibling tool. It also gives conditional alternatives (COMFYUI_RESTART_COMMAND for containers/systemd, ComfyUI-Manager over HTTP for remote) with exact prerequisites, leaving no doubt which path applies where.

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

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/artokun/comfyui-mcp'

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