get_workspace_graph
Reads the live ComfyUI workflow in the browser, including unsaved edits, to answer questions about the on-screen graph. Supports summary, UI, and API formats with configurable detail and scope.
Instructions
Read the workflow currently open in the browser, unsaved edits included.
This is the one view of a workflow that no file and no HTTP endpoint can give: what the user is actually looking at. Use it to answer questions about the graph on screen; use describe_workflow for the files in the workflows directory.
The summary reports selected - the nodes and groups the user has clicked on.
Treat it as them pointing: when a request says "this one" or "these", that is
which ones, and it beats guessing from a title. set_workspace_selection points
back the other way.
A large workflow does not fit in one answer at any detail that includes its
wiring, so the report steps down a level at a time until it does and says so in
reduced. When that happens the next move is only - outline the whole graph,
then ask again about the handful of nodes that matter. Each node in a subset
also carries feeds, the nodes reading from it, so a subset can be walked
downstream as well as up.
Args:
format: "summary" for a structured report - nodes, links, groups and a list
of issues (missing node types, muted or bypassed nodes, unconnected
required inputs). "ui" for the raw graph as a Save would write it.
"api" for the API-format prompt, the same JSON that Export (API) and
run_workflow use - only the frontend can produce it, which is why it is
available here and nowhere else in this server.
scope: "root" for the top level of the workflow, "active" for the subgraph
on screen, "all" to descend into every subgraph. On a workflow built
from subgraphs "root" is a handful of boxes and everything inside them
is invisible, so reach for "all" when the question is about the whole
thing. Nested nodes come back with path ids - 98:12 is node 12 inside
subgraph node 98 - the same shape the API format and progress events
use. Only "summary" descends; "ui" and "api" already cover the lot.
detail: how much to say about each node. "full" is everything including
widget values; "links" drops the widgets but keeps the wiring and
positions; "outline" is one line per node - type, title, and how many
links go in and out. Only a ceiling: a report over
COMFYUI_GRAPH_MAX_CHARS is reduced further whatever was asked for.
only: report just these node ids, at the detail asked for, however big the
graph is. Pass "selected" for whatever the user has clicked on.
client_id: which tab to ask; defaults to the most recently focused one.
workspace_status lists them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| only | No | ||
| scope | No | root | |
| detail | No | full | |
| format | No | summary | |
| client_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||