Skip to main content
Glama

restart_comfy

Restart ComfyUI and wait for it to become responsive again, optionally forcing a restart even with pending jobs.

Instructions

Restart ComfyUI and wait for it to answer again.

What a newly installed or edited node needs: nodes.py imports every pack once at startup and nothing re-reads them, so a pack added while ComfyUI runs is simply absent from /object_info. Changed extension JavaScript is the other case and needs only reload_workspace - a restart there is minutes spent on a page reload.

Two mechanisms, picked by who owns the process. One this server started is stopped and relaunched through COMFYUI_LAUNCH_SCRIPT. One you started yourself is asked to re-exec itself, through the bridge node - which is the only way to reach it at all, and has the advantage of coming back on the exact command line and environment it already had, rather than on this server's guess at them. That path therefore needs the node installed.

Schemas and model directories are dropped, since a restart is precisely what makes them stale. A tab that was connected reconnects on its own and is waited for; the workflow on its canvas survives, being the browser's, not ComfyUI's.

Args: wait: seconds to wait for ComfyUI to come back. force: restart even with jobs running or queued, throwing that work away.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNo
forceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/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 so richly. It discloses side effects (schemas/model directories dropped), process handling (server-started vs self-started, bridge-node re-exec), persistence of browser tabs, and the force parameter's destructive effect on queued jobs. It also notes that a restart is the only way to reach a self-started process. No annotation contradictions exist.

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 long but meticulously structured: it leads with the core action, then covers the 'when' (node vs JS), the 'how' (two mechanisms), the 'side effects' (schemas dropped, tabs reconnect), and finally the arguments. Every sentence conveys a distinct piece of decision-relevant information; none is wasted or redundant.

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 the tool's complexity (restart affects external process, UI state, and running work), the description covers all critical aspects: prerequisites (bridge node), side effects (schemas/models), workflow persistence, queued-job behavior, and parameter semantics. The output schema is not provided, but per instructions description needn't explain return values when an output schema exists.

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?

Schema provides only types and defaults, with 0% schema description coverage. The description fully compensates by explaining 'wait: seconds to wait for ComfyUI to come back' and 'force: restart even with jobs running or queued, throwing that work away.' This adds meaning far beyond the raw schema fields.

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: 'Restart ComfyUI and wait for it to answer again.' It clearly distinguishes this from siblings like reload_workspace (which handles JS-only changes) and comfy_start/stop by naming the exact restart action focused exclusively on ComfyUI.

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 when-to-use guidance: a restart is needed for newly installed/edited node packs because nodes.py imports only at startup. It also names alternatives and exclusions: JS changes only need reload_workspace, and it explains the two restart mechanisms depending on process ownership, including the bridge-node prerequisite. This is far beyond a generic 'use this to restart'.

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

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