ComfyUI Light MCP
v0.3.0-rc.2.1Workflow-first, Batch-native, Context-light.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_workflows
列出工作流(名称+描述+参数个数+ready/invalid/deleted 状态+指纹摘要+最后加载结果)。传 workflow 名则返回当前有效版本的完整参数说明;invalid 返回有界加载错误,不回退旧版本。
| Parameter | Type | Description |
|---|---|---|
workflow | string | 可选:工作流名,返回参数详情 |
run_workflow
提交运行工作流:单运行传 params(P2 兼容),批量传 runs 数组(每项 {label?, params})。dry_run=true 时只做只读预检,绝不创建 Batch/Job/Attempt 或提交 Prompt,返回逐项统计与 passed/failed/unknown 检查。正式运行参数只接受 manifest 白名单;批量单 run 参数错误记为 invalid job,单运行简写整体报错。可选 idempotency_key、continue_on_error(默认 true)、max_attempts(默认 1)。正式提交立即返回 batch_id,用 get_result/get_batch 轮询。
| Parameter | Type | Description |
|---|---|---|
workflow * | string | list_workflows 中的名称 |
continue_on_error | boolean | 默认 true;false 时首个失败将放弃该 batch 剩余未提交任务 |
dry_run | boolean | true:只预检并返回 not_submitted;不写 SQLite、不提交 Prompt、不触发调度或生成 |
idempotency_key | string | 幂等键:同键+相同请求内容重复调用返回既有 batch,不重复提交;同键但内容不同返回 IDEMPOTENCY_CONFLICT |
label | string | 单运行时的可选标记 |
max_attempts | integer | 失败重试次数上限(含首次共 N 次尝试),默认 1 不重试 |
params | object | 单运行参数集(与 runs 二选一) |
runs | array | 批量运行数组(与 params 二选一);按数组顺序调度执行 |
get_result
查询结果:省略 mode 时返回 index 指定的单项详情(默认 0)。mode=index 将全部 job 的精简结果写入本地 JSONL 索引,只返回计数、complete、index_path 和更新时间;complete 仅表示执行均已终结,unavailable_outputs 表示尚不可用文件数。默认按需下载,不触发生成;可用 get_batch 轮询进度。
| Parameter | Type | Description |
|---|---|---|
batch_id * | string | run_workflow 返回的 batch_id |
download | boolean | succeeded 且输出未落盘时按需下载(默认 true,幂等) |
index | integer | 运行序号(单运行为 0) |
mode | string | index:批次完整本地索引;省略:兼容单项查询 |
get_batch
查询批量运行全貌:batch 状态 + 逐状态统计(succeeded/failed/running/queued/pending/invalid/unknown/paused——submission_unknown 与 paused 单列,绝不混入 failed)+ 分页 job 列表(有界字段:状态/attempt/错误摘要/输出数,不含完整参数与日志)。status 可过滤:pending|invalid|submitting|unknown|queued|executing|succeeded|failed|timeout|cancelled|paused。
| Parameter | Type | Description |
|---|---|---|
batch_id * | string | run_workflow 返回的 batch_id |
limit | integer | 分页大小,默认 20,上限 100 |
offset | integer | 分页偏移,默认 0 |
status | string | 可选:按 job 状态过滤列表(统计不受影响) |