get_graph_nodes
Reads the nodes, pins and links of a Blueprint, material, MetaSound or Control Rig graph without modifying it, so you can inspect topology or fetch one node's full pin data.
Instructions
Read the nodes of one graph without changing it: a Blueprint graph (Animation and Widget Blueprints included), or the graph of a material, material function, sound cue, MetaSound Source, PCG graph or Control Rig. It is the read behind add_graph_node, connect_pins and set_pin_default_value, and the way to see what a graph does.
Every node has its node_id, which the graph tools take, and its object_path (not in a MetaSound), which get_object_info and set_properties take for the node's own settings. A Blueprint node also lists its class, title, position, comment and pins with their links and defaults; another asset answers with its editor's own view, named by graph_kind.
Read a graph, then one node: {"asset_path": "/Game/Blueprints/BP_Door", "compact": true} for the topology, then the same asset_path with "node_id" for every pin of one node. compact leaves out unlinked pins without a default, so a pin missing from a compact listing may still exist: check it by node_id. graph_name picks another graph of a Blueprint, a collapsed graph by its title included, and expand_composites inlines the collapsed graphs instead.
It reads the graph as the editor holds it, unsaved edits included, loading the asset from disk if needed, and compiles nothing, so a Blueprint that fails to compile still lists its nodes. A large graph costs many tokens: max_nodes caps the reply, and truncated says whether nodes were left out. Reading a graph under a read-only vendor root leaves its package dirty in memory; reload_asset_package with on_dirty="discard" cleans it.
Returns: { blueprint_name, graph_name, nodes: [{ node_id, object_path?, class, title, pos_x, pos_y, comment, pins: [...], subgraph? }], node_count, compact, total_node_count, excluded_count, truncated, graph_kind? } -- node_count counts the nodes returned and total_node_count those that exist; a node holding a nested graph has subgraph, the graph_name to read it with. Another asset: its editor's view, a MetaSound's links in connections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compact | No | Token-lean listing: drops pin types, positions and comments, and skips pins that are unlinked AND have no default. Also excludes K2Node_Knot + EdGraphNode_Comment unless exclude_classes is given. Good for reading topology, WRONG for checking whether a pin exists. (Optional, default false) | |
| node_id | No | Optional node_id (from add_graph_node / get_graph_nodes): return ONLY that node, in a Blueprint always at full fidelity (compact, exclude_classes, expand_composites and max_nodes are ignored) -- every pin with name, direction, type, linked_to and default, at a fraction of the tokens of a whole graph. A node_id the graph does not contain is an error. | |
| max_nodes | No | Cap on the number of nodes emitted (<=0 or absent = unlimited); the response still counts every non-excluded node in total_node_count and sets truncated=true. | |
| asset_path | No | The graph asset: a Blueprint by name or path, or the path of a material, material function, sound cue, MetaSound Source, PCG graph or Control Rig. Prefer the FULL path: a Blueprint short name with more than one match resolves silently to one of them, and stale backup copies share the original's name. | |
| graph_name | No | Blueprint only: the graph, default the event graph ("AnimGraph" for an Animation Blueprint's anim graph). Also resolves a collapsed composite subgraph by its title (e.g. 'In Game HUD') and accepts a path form ('EventGraph > In Game HUD'). The other assets have one graph: leave it out. | |
| blueprint_name | No | Older name of asset_path, still accepted. | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. | |
| exclude_classes | No | Array of leaf node class names to skip, matched against each node's "class" field (e.g. ["K2Node_Knot"]). Pass [] to include everything even in compact mode. Absent + compact=true means knots and comments are excluded; absent + compact=false excludes nothing. | |
| expand_composites | No | When true, inline the nodes of collapsed composite subgraphs recursively; each node gains a "graph" tag naming the graph it came from. Macro-library graphs are never inlined. (Optional, default false) |