comfyui-mcp 0.49.2 → 0.49.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/orchestrator/agent-backend.js +8 -0
- package/dist/orchestrator/agent-backend.js.map +1 -1
- package/dist/orchestrator/codex-backend.js +49 -0
- package/dist/orchestrator/codex-backend.js.map +1 -1
- package/dist/orchestrator/grok-backend.js +5 -0
- package/dist/orchestrator/grok-backend.js.map +1 -1
- package/dist/orchestrator/index.js +317 -22
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/ollama-backend.js +11 -2
- package/dist/orchestrator/ollama-backend.js.map +1 -1
- package/dist/orchestrator/panel-agent.js +591 -67
- package/dist/orchestrator/panel-agent.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +518 -65
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/orchestrator/run-completion-journal.js +914 -0
- package/dist/orchestrator/run-completion-journal.js.map +1 -0
- package/dist/orchestrator/session-store.js +11 -3
- package/dist/orchestrator/session-store.js.map +1 -1
- package/dist/services/asset-reconcile.js +83 -0
- package/dist/services/asset-reconcile.js.map +1 -0
- package/dist/services/asset-registry.js +9 -2
- package/dist/services/asset-registry.js.map +1 -1
- package/dist/services/download-jobs.js +178 -14
- package/dist/services/download-jobs.js.map +1 -1
- package/dist/services/download-progress.js +16 -18
- package/dist/services/download-progress.js.map +1 -1
- package/dist/services/extra-paths.js +61 -9
- package/dist/services/extra-paths.js.map +1 -1
- package/dist/services/hello-retarget.js +165 -0
- package/dist/services/hello-retarget.js.map +1 -0
- package/dist/services/job-history.js +50 -0
- package/dist/services/job-history.js.map +1 -1
- package/dist/services/job-watcher.js +38 -7
- package/dist/services/job-watcher.js.map +1 -1
- package/dist/services/manifest.js +92 -9
- package/dist/services/manifest.js.map +1 -1
- package/dist/services/model-resolver.js +616 -17
- package/dist/services/model-resolver.js.map +1 -1
- package/dist/services/output-dir.js +63 -15
- package/dist/services/output-dir.js.map +1 -1
- package/dist/services/panel-pin-guard.js +6 -62
- package/dist/services/panel-pin-guard.js.map +1 -1
- package/dist/services/ui-bridge.js +111 -14
- package/dist/services/ui-bridge.js.map +1 -1
- package/dist/services/workspace-env.js +179 -3
- package/dist/services/workspace-env.js.map +1 -1
- package/dist/tools/assets.js +34 -2
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/extra-paths.js +6 -4
- package/dist/tools/extra-paths.js.map +1 -1
- package/dist/tools/model-extras.js +26 -7
- package/dist/tools/model-extras.js.map +1 -1
- package/dist/tools/model-management.js +36 -8
- package/dist/tools/model-management.js.map +1 -1
- package/dist/tools/report-issue.js +12 -2
- package/dist/tools/report-issue.js.map +1 -1
- package/dist/tools/vocabulary.js +21 -0
- package/dist/tools/vocabulary.js.map +1 -1
- package/package.json +1 -1
- package/scripts/gen-tool-docs.ts +138 -4
- package/scripts/tool-doc-examples.ts +794 -0
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated, human-facing examples for the generated Tool Reference.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS FILE EXISTS. Every page under docs/tools/ is generated from the live
|
|
5
|
+
* zod schemas by scripts/gen-tool-docs.ts, and for a long time every single one
|
|
6
|
+
* of them ended in "Example coming soon — the call below is a generated
|
|
7
|
+
* skeleton" followed by `{"filename": "<filename>"}`. That skeleton is derived
|
|
8
|
+
* mechanically from the required fields, so it is never WRONG — it is just never
|
|
9
|
+
* useful either. A reader learns the parameter exists, which the parameter table
|
|
10
|
+
* already told them, and nothing about what a real value looks like.
|
|
11
|
+
*
|
|
12
|
+
* Hand-editing the .mdx is not an option: the next `npm run docs:gen` overwrites
|
|
13
|
+
* it, and CI runs docs:gen and fails if the tree changes. So the examples live
|
|
14
|
+
* HERE, as data, and the generator renders them.
|
|
15
|
+
*
|
|
16
|
+
* THE RULE FOR ADDING ONE: every `args` object is validated against the tool's
|
|
17
|
+
* real zod schema at generation time (see validateExamples in gen-tool-docs.ts).
|
|
18
|
+
* A field that does not exist, or has the wrong type, fails the build rather
|
|
19
|
+
* than shipping. Do not disable that check to make an example fit — if the
|
|
20
|
+
* example does not typecheck, the example is wrong. A confidently wrong example
|
|
21
|
+
* is worse than the skeleton it replaced, because a reader will copy it.
|
|
22
|
+
*
|
|
23
|
+
* WHAT MAKES A GOOD ENTRY:
|
|
24
|
+
* - `ask` is what a PERSON says out loud, not a restatement of the tool name.
|
|
25
|
+
* Nobody says "call list_workflows"; they say "what have I got saved?".
|
|
26
|
+
* - `args` uses plausible real values — a real filename, a real prompt, a real
|
|
27
|
+
* HuggingFace URL — not `<placeholder>` echoes of the field name.
|
|
28
|
+
* - `returns` says what lands back in the conversation, in a sentence.
|
|
29
|
+
* - `caution` is REQUIRED wherever the call deletes, overwrites, costs money,
|
|
30
|
+
* or interrupts work someone else may be waiting on.
|
|
31
|
+
*
|
|
32
|
+
* WHAT THIS FILE MUST NOT DO: rewrite the tool DESCRIPTIONS. Those are tuned for
|
|
33
|
+
* model dispatch and a readability edit there is a regression in tool-choice
|
|
34
|
+
* accuracy, not an improvement (#557/#654). When a description reads badly to a
|
|
35
|
+
* human, add a `gloss` here — it renders ALONGSIDE the description, leaving the
|
|
36
|
+
* model-facing text untouched.
|
|
37
|
+
*
|
|
38
|
+
* COVERAGE IS DELIBERATELY PARTIAL. The beginner path is covered end to end;
|
|
39
|
+
* expert surfaces (training, RunPod, comfy-cli's 26 actions, node authoring) are
|
|
40
|
+
* left on the skeleton until someone writes examples worth reading. A missing
|
|
41
|
+
* example is an honest gap; a made-up one is a bug.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export interface ToolDocExample {
|
|
45
|
+
/** What a person actually says to the agent, in plain English. */
|
|
46
|
+
ask: string;
|
|
47
|
+
/**
|
|
48
|
+
* The call the agent then makes. Validated against the tool's real zod schema
|
|
49
|
+
* at generation time — an unknown or mistyped field fails `npm run docs:gen`.
|
|
50
|
+
*/
|
|
51
|
+
args: Record<string, unknown>;
|
|
52
|
+
/** What comes back, in a sentence or two. */
|
|
53
|
+
returns: string;
|
|
54
|
+
/**
|
|
55
|
+
* Rendered under the JSON when the arguments are shown in shortened form —
|
|
56
|
+
* used for the graph-shaped parameters, where pasting a complete 40-node
|
|
57
|
+
* workflow would bury the point. Say plainly what was left out.
|
|
58
|
+
*/
|
|
59
|
+
argsNote?: string;
|
|
60
|
+
/** Rendered as a warning. Required when the call destroys or costs something. */
|
|
61
|
+
caution?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ToolDocEntry {
|
|
65
|
+
/**
|
|
66
|
+
* A plain-language gloss shown ALONGSIDE (never instead of) the model-facing
|
|
67
|
+
* description. For tools whose description is written in terms a human reader
|
|
68
|
+
* has no reason to care about — context budgets, dispatch disambiguation.
|
|
69
|
+
*/
|
|
70
|
+
gloss?: string;
|
|
71
|
+
examples: ToolDocExample[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* An abbreviated but structurally REAL API-format graph, for the tools that take
|
|
76
|
+
* a whole workflow. Two genuine nodes rather than a fake one-liner: a reader
|
|
77
|
+
* should come away knowing that API format is an object keyed by node id, each
|
|
78
|
+
* value having `class_type` and `inputs`, and that a link is `[nodeId, slot]`.
|
|
79
|
+
* Every entry that uses it also carries an `argsNote` saying it is shortened.
|
|
80
|
+
*/
|
|
81
|
+
const WORKFLOW_FRAGMENT = {
|
|
82
|
+
"4": {
|
|
83
|
+
class_type: "CheckpointLoaderSimple",
|
|
84
|
+
inputs: { ckpt_name: "sd_xl_base_1.0.safetensors" },
|
|
85
|
+
},
|
|
86
|
+
"9": {
|
|
87
|
+
class_type: "SaveImage",
|
|
88
|
+
inputs: { filename_prefix: "portrait", images: ["8", 0] },
|
|
89
|
+
},
|
|
90
|
+
} as const;
|
|
91
|
+
|
|
92
|
+
const FRAGMENT_NOTE =
|
|
93
|
+
"Shortened for readability — two nodes of a real API-format graph are shown. " +
|
|
94
|
+
"In practice the agent passes the whole thing: the graph it just loaded with " +
|
|
95
|
+
"get_workflow, or the one it built for you.";
|
|
96
|
+
|
|
97
|
+
export const TOOL_DOC_EXAMPLES: Readonly<Record<string, ToolDocEntry>> = {
|
|
98
|
+
// -------------------------------------------------------------------------
|
|
99
|
+
// Image & Audio Generation
|
|
100
|
+
// -------------------------------------------------------------------------
|
|
101
|
+
generate_image: {
|
|
102
|
+
gloss:
|
|
103
|
+
"The one-line way to get a picture. You do not need a workflow open, or " +
|
|
104
|
+
"any workflow at all — describe the image and this builds and runs a " +
|
|
105
|
+
"sensible graph for you. Everything except the prompt is optional and " +
|
|
106
|
+
"falls back to your saved defaults.",
|
|
107
|
+
examples: [
|
|
108
|
+
{
|
|
109
|
+
ask: "Make me a picture of a red fox in the snow.",
|
|
110
|
+
args: { prompt: "a red fox in deep snow, golden hour, sharp focus" },
|
|
111
|
+
returns:
|
|
112
|
+
"The finished image, inline in the conversation, plus the seed and " +
|
|
113
|
+
"settings that produced it so you can ask for the same thing again.",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
ask: "Same fox, but widescreen, more detail, and keep it repeatable.",
|
|
117
|
+
args: {
|
|
118
|
+
prompt: "a red fox in deep snow, golden hour, sharp focus",
|
|
119
|
+
negative_prompt: "blurry, watermark, text",
|
|
120
|
+
width: 1344,
|
|
121
|
+
height: 768,
|
|
122
|
+
steps: 30,
|
|
123
|
+
cfg: 4.5,
|
|
124
|
+
seed: 12345,
|
|
125
|
+
},
|
|
126
|
+
returns:
|
|
127
|
+
"The same fields plus the image. Because `seed` was pinned, running " +
|
|
128
|
+
"this again with the same settings gives the same picture — that is " +
|
|
129
|
+
"how you iterate on one image instead of rolling a new one each time.",
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
generate_video: {
|
|
134
|
+
examples: [
|
|
135
|
+
{
|
|
136
|
+
ask: "Turn that fox picture into a short clip of it walking.",
|
|
137
|
+
args: {
|
|
138
|
+
prompt: "a red fox walking through deep snow, camera slowly pushing in",
|
|
139
|
+
seconds: 5,
|
|
140
|
+
resolution: "832x480",
|
|
141
|
+
fps: 16,
|
|
142
|
+
},
|
|
143
|
+
returns:
|
|
144
|
+
"A path to the rendered video file plus the settings used. Video takes " +
|
|
145
|
+
"far longer than a still — minutes, not seconds — so the agent will " +
|
|
146
|
+
"usually tell you it has started and then report back.",
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
// -------------------------------------------------------------------------
|
|
152
|
+
// Workflow Execution
|
|
153
|
+
// -------------------------------------------------------------------------
|
|
154
|
+
health_check: {
|
|
155
|
+
gloss:
|
|
156
|
+
"The first thing to try when something is not working. It answers \"is " +
|
|
157
|
+
"ComfyUI actually up, and can it see my models?\" in one call.",
|
|
158
|
+
examples: [
|
|
159
|
+
{
|
|
160
|
+
ask: "Is everything working?",
|
|
161
|
+
args: {},
|
|
162
|
+
returns:
|
|
163
|
+
"Whether the server is reachable, what it is running on, and whether " +
|
|
164
|
+
"the model folders have anything in them.",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
ask: "Check the setup, and tell me if any recent runs blew up.",
|
|
168
|
+
args: { model_categories: ["checkpoints", "loras"], recent_errors: 5 },
|
|
169
|
+
returns:
|
|
170
|
+
"The same report, narrowed to the two model folders you asked about, " +
|
|
171
|
+
"with the last five errors from history attached.",
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
queue: {
|
|
176
|
+
gloss:
|
|
177
|
+
"One tool for everything to do with the job queue — see what is waiting, " +
|
|
178
|
+
"reorder it, cancel something. Which job it does is set by `action`. This " +
|
|
179
|
+
"is the shape most of the newer tools have; see " +
|
|
180
|
+
"[Using the tools](/using-tools) for why.",
|
|
181
|
+
examples: [
|
|
182
|
+
{
|
|
183
|
+
ask: "What's still running?",
|
|
184
|
+
args: { action: "list" },
|
|
185
|
+
returns:
|
|
186
|
+
"The job currently rendering and everything queued behind it, each " +
|
|
187
|
+
"with its prompt_id — the receipt you use to ask about one job later.",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
ask: "Kill the one that's running, it's wrong.",
|
|
191
|
+
args: { action: "cancel", prompt_id: "8f3c1a02-6d4e-4b9a-9f21-77c0be5d1e44" },
|
|
192
|
+
returns: "Confirmation that the job was interrupted.",
|
|
193
|
+
caution:
|
|
194
|
+
"This stops work in progress and you do not get the partial result. " +
|
|
195
|
+
"If you share this ComfyUI with anyone else, make sure the job is yours.",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
ask: "Clear the whole queue, I want to start over.",
|
|
199
|
+
args: { action: "clear", clear_pending: true },
|
|
200
|
+
returns: "Confirmation of how many jobs were dropped.",
|
|
201
|
+
caution:
|
|
202
|
+
"Destructive and not undoable — every waiting job is discarded, " +
|
|
203
|
+
"including any that someone else queued.",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
get_history: {
|
|
208
|
+
examples: [
|
|
209
|
+
{
|
|
210
|
+
ask: "Did that finish? What did it produce?",
|
|
211
|
+
args: { prompt_id: "8f3c1a02-6d4e-4b9a-9f21-77c0be5d1e44" },
|
|
212
|
+
returns:
|
|
213
|
+
"That run's outcome and the files it wrote. Omit `prompt_id` to get " +
|
|
214
|
+
"recent runs instead of one specific one.",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
diagnose_run: {
|
|
219
|
+
gloss:
|
|
220
|
+
"For when a run failed and the error text does not mean anything to you. " +
|
|
221
|
+
"This reads the failure and tells you what to do about it.",
|
|
222
|
+
examples: [
|
|
223
|
+
{
|
|
224
|
+
ask: "That render failed and I don't understand the error.",
|
|
225
|
+
args: { prompt_id: "8f3c1a02-6d4e-4b9a-9f21-77c0be5d1e44" },
|
|
226
|
+
returns:
|
|
227
|
+
"A plain reading of what went wrong — a missing model, a bad " +
|
|
228
|
+
"connection, not enough VRAM — and the suggested fix. Omit " +
|
|
229
|
+
"`prompt_id` and it looks at the most recent failure.",
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
get_system_stats: {
|
|
234
|
+
examples: [
|
|
235
|
+
{
|
|
236
|
+
ask: "How much VRAM have I got left?",
|
|
237
|
+
args: {},
|
|
238
|
+
returns:
|
|
239
|
+
"The GPU, its total and free VRAM, system RAM, and the ComfyUI and " +
|
|
240
|
+
"Python versions.",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
enqueue_workflow: {
|
|
245
|
+
gloss:
|
|
246
|
+
"Runs a workflow that the agent is holding in the conversation — one it " +
|
|
247
|
+
"just built or loaded from a file. If you want to run the graph you are " +
|
|
248
|
+
"LOOKING at in ComfyUI, that is the panel's run tool instead, and if you " +
|
|
249
|
+
"just want a picture, use generate_image.",
|
|
250
|
+
examples: [
|
|
251
|
+
{
|
|
252
|
+
ask: "Run it.",
|
|
253
|
+
args: { workflow: WORKFLOW_FRAGMENT },
|
|
254
|
+
argsNote: FRAGMENT_NOTE,
|
|
255
|
+
returns:
|
|
256
|
+
"A prompt_id straight away, then the finished images once the render " +
|
|
257
|
+
"completes.",
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
get_template_schema: {
|
|
262
|
+
examples: [
|
|
263
|
+
{
|
|
264
|
+
ask: "What can I change about the Flux template?",
|
|
265
|
+
args: { template: "flux_dev_full_text_to_image" },
|
|
266
|
+
returns:
|
|
267
|
+
"The knobs that template exposes — prompt, size, steps, which model " +
|
|
268
|
+
"file — with their current values, so you know what to pass to " +
|
|
269
|
+
"run_template.",
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
run_template: {
|
|
274
|
+
examples: [
|
|
275
|
+
{
|
|
276
|
+
ask: "Run the Flux template with my prompt and wait for it.",
|
|
277
|
+
args: {
|
|
278
|
+
template: "flux_dev_full_text_to_image",
|
|
279
|
+
overrides: { prompt: "a lighthouse in a storm, dramatic sky" },
|
|
280
|
+
wait: true,
|
|
281
|
+
},
|
|
282
|
+
returns:
|
|
283
|
+
"With `wait: true`, the finished result in one go. Leave it off and " +
|
|
284
|
+
"you get a prompt_id immediately and check back later.",
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
// -------------------------------------------------------------------------
|
|
290
|
+
// Workflow Library
|
|
291
|
+
// -------------------------------------------------------------------------
|
|
292
|
+
list_workflows: {
|
|
293
|
+
gloss:
|
|
294
|
+
"The saved workflow FILES in your ComfyUI — the same list you see in the " +
|
|
295
|
+
"ComfyUI sidebar. Usually the first call in any \"open my…\" request.",
|
|
296
|
+
examples: [
|
|
297
|
+
{
|
|
298
|
+
ask: "What workflows have I got saved?",
|
|
299
|
+
args: {},
|
|
300
|
+
returns:
|
|
301
|
+
"A numbered list of .json filenames. Pick one and hand it to " +
|
|
302
|
+
"analyze_workflow or get_workflow.",
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
},
|
|
306
|
+
get_workflow: {
|
|
307
|
+
gloss:
|
|
308
|
+
"Reads a saved FILE, not the graph currently open on your canvas. Ask for " +
|
|
309
|
+
"this when the agent needs the actual JSON to change or run; if you only " +
|
|
310
|
+
"want to know what a workflow does, analyze_workflow is the shorter answer.",
|
|
311
|
+
examples: [
|
|
312
|
+
{
|
|
313
|
+
ask: "Open my portrait workflow so we can change the prompt.",
|
|
314
|
+
args: { filename: "portrait-flux.json" },
|
|
315
|
+
returns:
|
|
316
|
+
"The full workflow as runnable API-format JSON. This is a big " +
|
|
317
|
+
"response — it is meant for the agent to work on, not for you to read.",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
ask: "Give me the raw file exactly as ComfyUI saved it.",
|
|
321
|
+
args: { filename: "portrait-flux.json", format: "ui" },
|
|
322
|
+
returns:
|
|
323
|
+
"The on-disk UI format, including node positions and colours — what " +
|
|
324
|
+
"you want if the file is going to be loaded back into the canvas " +
|
|
325
|
+
"rather than executed.",
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
analyze_workflow: {
|
|
330
|
+
gloss:
|
|
331
|
+
"\"Explain this workflow to me.\" Cheaper and far more readable than " +
|
|
332
|
+
"get_workflow when you just want to understand what a file does.",
|
|
333
|
+
examples: [
|
|
334
|
+
{
|
|
335
|
+
ask: "What does my portrait workflow actually do?",
|
|
336
|
+
args: { filename: "portrait-flux.json" },
|
|
337
|
+
returns:
|
|
338
|
+
"A short summary: the model it loads, the prompts, the sampler " +
|
|
339
|
+
"settings, and what it saves.",
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
ask: "Is that workflow going to run, or is something missing?",
|
|
343
|
+
args: { filename: "portrait-flux.json", view: "health" },
|
|
344
|
+
returns:
|
|
345
|
+
"Problems only — missing models, unconnected inputs, nodes whose " +
|
|
346
|
+
"packs are not installed.",
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
save_workflow: {
|
|
351
|
+
examples: [
|
|
352
|
+
{
|
|
353
|
+
ask: "Save that as a new file so I don't lose the original.",
|
|
354
|
+
args: { filename: "portrait-flux-v2.json", workflow: WORKFLOW_FRAGMENT },
|
|
355
|
+
argsNote: FRAGMENT_NOTE,
|
|
356
|
+
returns: "Confirmation and the path it was written to.",
|
|
357
|
+
caution:
|
|
358
|
+
"Writing to a filename that already exists replaces that file. Ask " +
|
|
359
|
+
"for a new name — as above — when you want to keep the original.",
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
// -------------------------------------------------------------------------
|
|
365
|
+
// Workflow Authoring
|
|
366
|
+
// -------------------------------------------------------------------------
|
|
367
|
+
get_node_info: {
|
|
368
|
+
examples: [
|
|
369
|
+
{
|
|
370
|
+
ask: "What settings does the KSampler node have?",
|
|
371
|
+
args: { node_type: "KSampler" },
|
|
372
|
+
returns:
|
|
373
|
+
"That node's inputs and outputs with their types. Dropdown options are " +
|
|
374
|
+
"summarised as a count by default, because a model-loader dropdown can " +
|
|
375
|
+
"be hundreds of kilobytes on its own.",
|
|
376
|
+
},
|
|
377
|
+
],
|
|
378
|
+
},
|
|
379
|
+
validate_workflow: {
|
|
380
|
+
examples: [
|
|
381
|
+
{
|
|
382
|
+
ask: "Will this run?",
|
|
383
|
+
args: { workflow: WORKFLOW_FRAGMENT },
|
|
384
|
+
argsNote: FRAGMENT_NOTE,
|
|
385
|
+
returns:
|
|
386
|
+
"Either a clean bill of health or the specific problems, without " +
|
|
387
|
+
"queuing anything.",
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
// -------------------------------------------------------------------------
|
|
393
|
+
// Assets & Images
|
|
394
|
+
// -------------------------------------------------------------------------
|
|
395
|
+
list_output_images: {
|
|
396
|
+
gloss:
|
|
397
|
+
"What has ComfyUI actually written to disk lately. Worth knowing: video " +
|
|
398
|
+
"nodes often finish without registering in ComfyUI's history, so this is " +
|
|
399
|
+
"the reliable way to confirm a video really rendered.",
|
|
400
|
+
examples: [
|
|
401
|
+
{
|
|
402
|
+
ask: "Show me the last few things I generated.",
|
|
403
|
+
args: { limit: 10 },
|
|
404
|
+
returns:
|
|
405
|
+
"The ten newest files, newest first, each with whether it is an image " +
|
|
406
|
+
"or a video, its folder, size and time. Not the pictures themselves — " +
|
|
407
|
+
"ask to see one and the agent fetches it.",
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
ask: "Did that fox render ever come out?",
|
|
411
|
+
args: { pattern: "fox", limit: 5 },
|
|
412
|
+
returns: "Only files whose names contain \"fox\".",
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
},
|
|
416
|
+
view_image: {
|
|
417
|
+
gloss:
|
|
418
|
+
"Puts an image in front of the agent so it can actually look at it — for " +
|
|
419
|
+
"\"is this any good?\", \"compare these two\", \"what is wrong with the hands\".",
|
|
420
|
+
examples: [
|
|
421
|
+
{
|
|
422
|
+
ask: "Show me that one.",
|
|
423
|
+
args: { asset_id: "asset_01HQ8Z3K7V" },
|
|
424
|
+
returns:
|
|
425
|
+
"The image inline, visible to both of you. The asset id comes from " +
|
|
426
|
+
"the completion message of the run that made it.",
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
},
|
|
430
|
+
get_image: {
|
|
431
|
+
examples: [
|
|
432
|
+
{
|
|
433
|
+
ask: "Save that render onto my desktop.",
|
|
434
|
+
args: {
|
|
435
|
+
filename: "portrait_00042_.png",
|
|
436
|
+
type: "output",
|
|
437
|
+
save_dir: "C:/Users/me/Desktop",
|
|
438
|
+
},
|
|
439
|
+
returns:
|
|
440
|
+
"The file copied to that folder, and the path it landed at. Use this " +
|
|
441
|
+
"rather than view_image for video and audio, which cannot be shown " +
|
|
442
|
+
"inline.",
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
// -------------------------------------------------------------------------
|
|
448
|
+
// Models
|
|
449
|
+
// -------------------------------------------------------------------------
|
|
450
|
+
search_models: {
|
|
451
|
+
examples: [
|
|
452
|
+
{
|
|
453
|
+
ask: "Find me a Flux model I can actually run.",
|
|
454
|
+
args: { query: "flux schnell", limit: 5 },
|
|
455
|
+
returns:
|
|
456
|
+
"Matching models with their download URLs and file sizes. Nothing is " +
|
|
457
|
+
"downloaded — this is a search.",
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
},
|
|
461
|
+
download_model: {
|
|
462
|
+
examples: [
|
|
463
|
+
{
|
|
464
|
+
ask: "Get that one.",
|
|
465
|
+
args: {
|
|
466
|
+
url: "https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors",
|
|
467
|
+
target_subfolder: "checkpoints",
|
|
468
|
+
},
|
|
469
|
+
returns:
|
|
470
|
+
"Live progress in the panel's download tray, and the path the file " +
|
|
471
|
+
"landed at. `target_subfolder` decides which ComfyUI dropdown it shows " +
|
|
472
|
+
"up in — checkpoints, loras, vae and so on.",
|
|
473
|
+
caution:
|
|
474
|
+
"Model files are large — many are 5-25 GB. Check you have the disk " +
|
|
475
|
+
"space before agreeing to a few of these.",
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
},
|
|
479
|
+
list_local_models: {
|
|
480
|
+
examples: [
|
|
481
|
+
{
|
|
482
|
+
ask: "Which checkpoints do I already have?",
|
|
483
|
+
args: { model_type: "checkpoints" },
|
|
484
|
+
returns:
|
|
485
|
+
"The model filenames in that folder — the exact strings a workflow " +
|
|
486
|
+
"needs. Omit `model_type` to see every folder at once.",
|
|
487
|
+
},
|
|
488
|
+
],
|
|
489
|
+
},
|
|
490
|
+
resolve_missing_models: {
|
|
491
|
+
gloss:
|
|
492
|
+
"The answer to \"this workflow says a model is missing\". It works out " +
|
|
493
|
+
"what is actually absent and finds downloadable candidates, including " +
|
|
494
|
+
"smaller quantised versions when the full file will not fit your GPU.",
|
|
495
|
+
examples: [
|
|
496
|
+
{
|
|
497
|
+
ask: "This workflow won't run, it says something's missing. Find it for me.",
|
|
498
|
+
args: { workflow: WORKFLOW_FRAGMENT },
|
|
499
|
+
argsNote: FRAGMENT_NOTE,
|
|
500
|
+
returns:
|
|
501
|
+
"Each missing file with candidate downloads, their sizes and " +
|
|
502
|
+
"precision, and whether each one fits your VRAM. It downloads nothing " +
|
|
503
|
+
"— you pick, then it fetches.",
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
},
|
|
507
|
+
remove_model: {
|
|
508
|
+
examples: [
|
|
509
|
+
{
|
|
510
|
+
ask: "Delete that old LoRA, I'm out of disk space.",
|
|
511
|
+
args: { path: "loras/old-character-v1.safetensors" },
|
|
512
|
+
returns: "Confirmation, and how much space came back.",
|
|
513
|
+
caution:
|
|
514
|
+
"This deletes the file. There is no undo and no recycle bin — you " +
|
|
515
|
+
"would have to download it again. Check the path is the one you mean.",
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
// -------------------------------------------------------------------------
|
|
521
|
+
// Custom Nodes
|
|
522
|
+
// -------------------------------------------------------------------------
|
|
523
|
+
search_custom_nodes: {
|
|
524
|
+
examples: [
|
|
525
|
+
{
|
|
526
|
+
ask: "Is there a node pack for face detailing?",
|
|
527
|
+
args: { query: "face detailer", limit: 5 },
|
|
528
|
+
returns:
|
|
529
|
+
"Matching packs from the registry with their ids, authors and " +
|
|
530
|
+
"descriptions. The id is what install_custom_node wants.",
|
|
531
|
+
},
|
|
532
|
+
],
|
|
533
|
+
},
|
|
534
|
+
install_custom_node: {
|
|
535
|
+
examples: [
|
|
536
|
+
{
|
|
537
|
+
ask: "Install the Impact Pack.",
|
|
538
|
+
args: { id: "comfyui-impact-pack" },
|
|
539
|
+
returns:
|
|
540
|
+
"Progress, then confirmation. New nodes do not appear until ComfyUI " +
|
|
541
|
+
"restarts — the agent will normally offer to do that for you.",
|
|
542
|
+
caution:
|
|
543
|
+
"A custom node pack is third-party code that runs inside your " +
|
|
544
|
+
"ComfyUI. Install packs you have reason to trust, the same as any " +
|
|
545
|
+
"other plugin.",
|
|
546
|
+
},
|
|
547
|
+
],
|
|
548
|
+
},
|
|
549
|
+
install_workflow_dependencies: {
|
|
550
|
+
gloss:
|
|
551
|
+
"For a workflow someone sent you that is full of red nodes: this installs " +
|
|
552
|
+
"the node PACKS it needs. Missing model files are a different problem — " +
|
|
553
|
+
"that is resolve_missing_models.",
|
|
554
|
+
examples: [
|
|
555
|
+
{
|
|
556
|
+
ask: "Someone sent me this workflow and half the nodes are red. Fix it.",
|
|
557
|
+
args: { workflow: WORKFLOW_FRAGMENT },
|
|
558
|
+
argsNote: FRAGMENT_NOTE,
|
|
559
|
+
returns:
|
|
560
|
+
"What it installed, what was already there, and anything it could not " +
|
|
561
|
+
"find. A restart is normally needed before the nodes load.",
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
node_snapshot: {
|
|
566
|
+
gloss:
|
|
567
|
+
"A restore point for your installed node packs. Take one before a round " +
|
|
568
|
+
"of installing, and you have a way back if something breaks.",
|
|
569
|
+
examples: [
|
|
570
|
+
{
|
|
571
|
+
ask: "Save where my nodes are at before I start installing things.",
|
|
572
|
+
args: { action: "save", name: "before-impact-pack" },
|
|
573
|
+
returns: "Confirmation that the snapshot was recorded.",
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
ask: "That broke everything. Put it back how it was.",
|
|
577
|
+
args: { action: "restore", name: "before-impact-pack" },
|
|
578
|
+
returns: "What it added, removed or re-pinned to match the snapshot.",
|
|
579
|
+
caution:
|
|
580
|
+
"Restoring rewrites your installed node packs to match the snapshot — " +
|
|
581
|
+
"anything installed since is uninstalled or downgraded.",
|
|
582
|
+
},
|
|
583
|
+
],
|
|
584
|
+
},
|
|
585
|
+
|
|
586
|
+
// -------------------------------------------------------------------------
|
|
587
|
+
// Install & Environment
|
|
588
|
+
// -------------------------------------------------------------------------
|
|
589
|
+
workspace: {
|
|
590
|
+
gloss:
|
|
591
|
+
"Which ComfyUI installation everything else is talking about. One tool, " +
|
|
592
|
+
"three jobs, chosen with `action` — this is the tool the " +
|
|
593
|
+
"[consolidation note](/using-tools#one-tool-several-jobs) uses as its " +
|
|
594
|
+
"worked example.",
|
|
595
|
+
examples: [
|
|
596
|
+
{
|
|
597
|
+
ask: "Which ComfyUI am I actually using?",
|
|
598
|
+
args: { action: "get" },
|
|
599
|
+
returns:
|
|
600
|
+
"The active install's path and how it was chosen — a flag, an " +
|
|
601
|
+
"environment variable, or the saved default.",
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
ask: "Always use the one on my big drive from now on.",
|
|
605
|
+
args: { action: "set_default", path: "D:/AI/ComfyUI" },
|
|
606
|
+
returns:
|
|
607
|
+
"Confirmation, and it sticks across restarts. Later sessions target " +
|
|
608
|
+
"this install unless something overrides it.",
|
|
609
|
+
},
|
|
610
|
+
],
|
|
611
|
+
},
|
|
612
|
+
install_panel: {
|
|
613
|
+
gloss:
|
|
614
|
+
"Installs and updates the Agent sidebar inside ComfyUI. This is the fix " +
|
|
615
|
+
"when a tool refuses with \"this panel is too old\".",
|
|
616
|
+
examples: [
|
|
617
|
+
{
|
|
618
|
+
ask: "What version of the panel have I got?",
|
|
619
|
+
args: { action: "status" },
|
|
620
|
+
returns:
|
|
621
|
+
"The installed panel version, where it lives, and whether it is " +
|
|
622
|
+
"pinned. This action changes nothing.",
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
ask: "It says my panel is too old — update it.",
|
|
626
|
+
args: { action: "update" },
|
|
627
|
+
returns:
|
|
628
|
+
"The update result. Two more steps are yours: restart ComfyUI, then " +
|
|
629
|
+
"hard-refresh the ComfyUI browser tab (Ctrl+Shift+R). Without that " +
|
|
630
|
+
"refresh the tab keeps running the old cached panel code and the same " +
|
|
631
|
+
"refusal comes back.",
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
get_environment: {
|
|
636
|
+
examples: [
|
|
637
|
+
{
|
|
638
|
+
ask: "Tell me about my setup — useful when I'm reporting a bug.",
|
|
639
|
+
args: {},
|
|
640
|
+
returns:
|
|
641
|
+
"Where ComfyUI is installed, the Python and torch versions, the GPU, " +
|
|
642
|
+
"and which settings are in force. The first thing to paste into an " +
|
|
643
|
+
"issue.",
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
},
|
|
647
|
+
self_update: {
|
|
648
|
+
examples: [
|
|
649
|
+
{
|
|
650
|
+
ask: "Am I on the latest version?",
|
|
651
|
+
args: { action: "status" },
|
|
652
|
+
returns: "Your version, the latest published version, and whether they differ.",
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
ask: "Update it.",
|
|
656
|
+
args: { action: "update" },
|
|
657
|
+
returns:
|
|
658
|
+
"The upgrade result. Your MCP client has to be restarted afterwards " +
|
|
659
|
+
"to pick up the new server.",
|
|
660
|
+
},
|
|
661
|
+
],
|
|
662
|
+
},
|
|
663
|
+
report_issue: {
|
|
664
|
+
examples: [
|
|
665
|
+
{
|
|
666
|
+
ask: "This keeps crashing. File a bug about it.",
|
|
667
|
+
args: {
|
|
668
|
+
title: "Video render finishes but no file appears in outputs",
|
|
669
|
+
body:
|
|
670
|
+
"Running the WAN template completes and history shows success, but " +
|
|
671
|
+
"output/video/ is empty. Happens every time on 0.49.3.",
|
|
672
|
+
},
|
|
673
|
+
returns:
|
|
674
|
+
"A GitHub issue on the project, with your environment details " +
|
|
675
|
+
"attached automatically, and a link to it.",
|
|
676
|
+
caution:
|
|
677
|
+
"This posts publicly. The environment block it attaches includes " +
|
|
678
|
+
"paths and versions from your machine — glance at what it drafted " +
|
|
679
|
+
"before agreeing to send it.",
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
},
|
|
683
|
+
|
|
684
|
+
// -------------------------------------------------------------------------
|
|
685
|
+
// Process Control
|
|
686
|
+
// -------------------------------------------------------------------------
|
|
687
|
+
start_comfyui: {
|
|
688
|
+
examples: [
|
|
689
|
+
{
|
|
690
|
+
ask: "Start ComfyUI.",
|
|
691
|
+
args: {},
|
|
692
|
+
returns:
|
|
693
|
+
"It launches the server and waits until it is answering, then tells " +
|
|
694
|
+
"you the URL. Only works for a ComfyUI on this machine.",
|
|
695
|
+
},
|
|
696
|
+
],
|
|
697
|
+
},
|
|
698
|
+
restart_comfyui: {
|
|
699
|
+
gloss:
|
|
700
|
+
"The standard next step after installing a node pack — new nodes are not " +
|
|
701
|
+
"loaded until ComfyUI starts again.",
|
|
702
|
+
examples: [
|
|
703
|
+
{
|
|
704
|
+
ask: "Restart it so the new nodes load.",
|
|
705
|
+
args: {},
|
|
706
|
+
returns:
|
|
707
|
+
"The server stops and comes back up, and you are told when it is " +
|
|
708
|
+
"answering again.",
|
|
709
|
+
caution:
|
|
710
|
+
"Anything queued or rendering is lost. Check the queue is empty first " +
|
|
711
|
+
"if a long job is in flight.",
|
|
712
|
+
},
|
|
713
|
+
],
|
|
714
|
+
},
|
|
715
|
+
stop_comfyui: {
|
|
716
|
+
examples: [
|
|
717
|
+
{
|
|
718
|
+
ask: "Shut ComfyUI down, I need the VRAM.",
|
|
719
|
+
args: {},
|
|
720
|
+
returns: "Confirmation that the process stopped.",
|
|
721
|
+
caution: "Any running or queued render is lost.",
|
|
722
|
+
},
|
|
723
|
+
],
|
|
724
|
+
},
|
|
725
|
+
|
|
726
|
+
// -------------------------------------------------------------------------
|
|
727
|
+
// Defaults
|
|
728
|
+
// -------------------------------------------------------------------------
|
|
729
|
+
get_defaults: {
|
|
730
|
+
examples: [
|
|
731
|
+
{
|
|
732
|
+
ask: "What settings do you use when I don't say?",
|
|
733
|
+
args: {},
|
|
734
|
+
returns:
|
|
735
|
+
"The current fallback size, steps, cfg, sampler and checkpoint, and " +
|
|
736
|
+
"where each came from.",
|
|
737
|
+
},
|
|
738
|
+
],
|
|
739
|
+
},
|
|
740
|
+
set_defaults: {
|
|
741
|
+
gloss:
|
|
742
|
+
"Stop repeating yourself. Set the values you always want once, and leave " +
|
|
743
|
+
"them out of every later request.",
|
|
744
|
+
examples: [
|
|
745
|
+
{
|
|
746
|
+
ask: "Always use 1024 by 1024 and 30 steps, permanently.",
|
|
747
|
+
args: { values: { width: 1024, height: 1024, steps: 30 }, persist: true },
|
|
748
|
+
returns:
|
|
749
|
+
"Confirmation of the new defaults. `persist: true` writes them to your " +
|
|
750
|
+
"config file so they survive a restart; without it they last only for " +
|
|
751
|
+
"this session.",
|
|
752
|
+
},
|
|
753
|
+
],
|
|
754
|
+
},
|
|
755
|
+
|
|
756
|
+
// -------------------------------------------------------------------------
|
|
757
|
+
// Apps (micro-apps)
|
|
758
|
+
// -------------------------------------------------------------------------
|
|
759
|
+
apps: {
|
|
760
|
+
gloss:
|
|
761
|
+
"Micro-apps are workflows someone has already wired up and reduced to a " +
|
|
762
|
+
"few boxes to fill in — the closest thing here to a normal app. Handy on " +
|
|
763
|
+
"mobile, where there is no canvas to edit. One tool, several jobs, chosen " +
|
|
764
|
+
"with `action`.",
|
|
765
|
+
examples: [
|
|
766
|
+
{
|
|
767
|
+
ask: "What one-click apps do I have?",
|
|
768
|
+
args: { action: "list" },
|
|
769
|
+
returns:
|
|
770
|
+
"Every installed app with its id, name and description. Read-only.",
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
ask: "What do I need to fill in for the portrait one?",
|
|
774
|
+
args: { action: "get", app_id: "b1f4c2de-90a7-4c3e-9d21-5c8e2f7a13bb" },
|
|
775
|
+
returns:
|
|
776
|
+
"That app's input form — each box with its label, type and default, " +
|
|
777
|
+
"and the key you set it by.",
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
ask: "Run it with \"a snow leopard on a rooftop\".",
|
|
781
|
+
args: {
|
|
782
|
+
action: "run",
|
|
783
|
+
app_id: "b1f4c2de-90a7-4c3e-9d21-5c8e2f7a13bb",
|
|
784
|
+
values: { "6.text": "a snow leopard on a rooftop at dusk" },
|
|
785
|
+
},
|
|
786
|
+
returns:
|
|
787
|
+
"A prompt_id immediately; the app renders in the background. Check on " +
|
|
788
|
+
"it with `action: \"run_status\"` and the same app_id plus that " +
|
|
789
|
+
"prompt_id. The odd-looking `\"6.text\"` key is nodeId.widget — the " +
|
|
790
|
+
"form from `action: \"get\"` tells you which keys exist.",
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
},
|
|
794
|
+
};
|