Skip to main content
Glama

restart_comfyui

Restart ComfyUI to reload custom nodes or fix wedged jobs. Stops and relaunches the server with the same configuration, waiting for API readiness.

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). 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.
Behavior5/5

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

With no annotations provided, the description carries the full burden and does an excellent job. It discloses side effects (kill process tree, queued/rendering work lost), operational details (polls API for readiness, waits for port), prerequisites (ComfyUI-Manager for remote reboot), and limitations (local vs remote). This is comprehensive and transparent.

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 with a clear overview and bullet-point-like breakdown per action. Each sentence adds valuable information without redundancy. It is appropriately sized for the complexity of the tool, hitting the sweet spot between detail and conciseness.

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?

Given no output schema, the description covers all critical aspects: behavior, side effects, prerequisites, and environmental constraints. It explains what happens on stop (process tree kill, WebSocket reset), start (relaunch from saved info), and restart (stop + relaunch, remote support). This is complete for the agent to understand the tool's full lifecycle impact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single 'action' parameter is fully described both in the schema enum and in the description. The description adds substantial meaning beyond the schema by explaining the lifecycle implications of each value, including the workflow context (e.g., restart is an escalation), remote capabilities, and process info capture/relaunch behavior.

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 clearly defines the tool as lifecycle control for the ComfyUI server process, with explicit verbs 'restart', 'start', and 'stop'. It distinguishes between these operations and provides specific details about each, making it easy to identify the correct action and differentiate from sibling tools like 'queue' or 'enqueue_workflow'.

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?

Provides explicit guidance on when to use each action: restart is 'the normal way to reload newly installed custom nodes' and the escalation for WEDGED jobs; start/stop are for local installs only, with restart also supporting remote/tunnelled setups. This effectively tells the agent when to use the tool and when not to, and implies alternatives (start/stop separately vs restart combined).

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

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