Skip to main content
Glama

connect_pins

Destructive

Links an output pin to an input pin in Blueprint, material, or other graph assets, enabling node connections after adding or listing nodes.

Instructions

Link one node's output pin to another node's input pin, in a Blueprint graph (Animation and Widget Blueprints included) or in the graph of a material, material function, sound cue, MetaSound Source, PCG graph or Control Rig.

Use it after add_graph_node, or on nodes that get_graph_nodes lists: both give the node ids and pin names. Not for: testing a pair without linking it (validate_pin_connection), unlinking (disconnect_pin), or creating and linking several Blueprint nodes in one undo step (build_blueprint_graph). Refused during Play-in-Editor (see force).

Example: {"asset_path": "/Game/Blueprints/BP_Door", "source_node_id": "<a Branch's node_id>", "source_pin": "then", "target_node_id": "<a PrintString's node_id>", "target_pin": "execute"}. @input and @output stand for the graph's own input and output: target_node_id "@output" with target_pin "BaseColor" feeds a material's main input. On a sound cue, @output makes the source the cue's first node, and target_pin is the parent's input slot index (empty: its first free slot); on a MetaSound they are its graph inputs and outputs, named by the pin; on a PCG graph its input and output nodes.

In a Blueprint the graph's schema type-checks the pair, so AnimGraph pose links work too and an incompatible pair is an error, never a silent no-op. An exec output and a data input hold one link each, so linking one that is already linked replaces its old link; each call is one undo step, and undo puts the old link back. A node with a wildcard pin is reconstructed afterwards, so array, ForEach and Select pins take the linked type. A Blueprint is not compiled or saved: compile_blueprint, then save_asset. The other assets are saved by their editor, and a Control Rig is compiled.

Returns: { connected, source_node_id, target_node_id, graph_kind? } -- a failed link is an error, so connected is true in every Blueprint reply; another asset answers with its editor's own reply, saved included.

Input Schema

NameRequiredDescriptionDefault
forceNoOptional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk.
asset_pathNoThe 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.
graph_nameNoBlueprint only: the graph, default the event graph ("AnimGraph" for an Animation Blueprint's anim graph). BOTH nodes must live in this same graph. The other assets have one graph: leave it out.
source_pinYesOutput pin name on the source node (e.g. "then", "ReturnValue"; a material output name, empty for the first). In a Blueprint an output pin of that name is preferred and any pin with the name is accepted as a fallback.
target_pinYesInput pin name on the target node (e.g. "execute", "Condition"; a material input name without spaces; a sound cue slot index).
blueprint_nameNoOlder name of asset_path, still accepted.
blueprint_pathNoAlias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`.
source_node_idYesnode_id of the source node, or @input (from add_graph_node / get_graph_nodes).
target_node_idYesnode_id of the target node, or @output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv2.5.0
    • addedInput schema / properties / asset_path
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / blueprint_name / description
      Previous value: -"Blueprint name or path."New value: +"Older name of asset_path, still accepted."
    • changedInput schema / properties / graph_name / description
      Previous value: -"Target graph name; defaults to the Blueprint's event graph when omitted. BOTH nodes must live in this same graph."New value: +"Blueprint only: the graph, default the event graph (\"AnimGraph\" for an Animation Blueprint's anim graph). BOTH nodes must live in this same graph. The other assets have one graph: leave it out."
    • changedInput schema / properties / source_node_id / description
      Previous value: -"NodeGuid of the source node (from add_graph_node / get_graph_nodes)."New value: +"node_id of the source node, or @input (from add_graph_node / get_graph_nodes)."
    • changedInput schema / properties / source_pin / description
      Previous value: -"Output pin name on the source node (e.g. \"then\", \"ReturnValue\"). An output pin of that name is preferred; any pin with the name is accepted as a fallback."New value: +"Output pin name on the source node (e.g. \"then\", \"ReturnValue\"; a material output name, empty for the first). In a Blueprint an output pin of that name is preferred and any pin with the name is accepted as a fallback."
    • changedInput schema / properties / target_node_id / description
      Previous value: -"NodeGuid of the target node."New value: +"node_id of the target node, or @output."
    • changedInput schema / properties / target_pin / description
      Previous value: -"Input pin name on the target node (e.g. \"execute\", \"Condition\")."New value: +"Input pin name on the target node (e.g. \"execute\", \"Condition\"; a material input name without spaces; a sound cue slot index)."
  2. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say mutating/destructive/non-idempotent; the description goes far beyond by disclosing that the graph schema type-checks the pair so an incompatible link is an error not a silent no-op, that exec-output/data-input pins hold one link so linking replaces the old one, that each call is one undo step and undo restores the old link, that wildcard pins get reconstructed, and that a Blueprint is neither compiled nor saved (compile_blueprint then save_asset). This is exactly the post-call consequence information a destructive tool needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then usage, example, semantics, behavior, and returns — a sensible order with no filler sentences. It is on the long side and the PIE/force mention partly duplicates the force parameter's own schema description, which keeps it from a 5.

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?

For a 9-parameter destructive tool with no output schema, the description covers the return shape ({ connected, source_node_id, target_node_id, graph_kind? }), notes that failures surface as errors rather than connected=false, explains cross-asset return differences, and states the required follow-up tools for persisting a Blueprint. An agent has everything needed to invoke and follow up correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, and the description earns above that by explaining the @input/@output sentinel values, giving a worked JSON example, and clarifying per-asset meaning (on a sound cue @output makes the source the cue's first node and target_pin is a slot index; on MetaSounds they are graph inputs/outputs). It does not re-explain force, graph_name, or the alias parameters, which the schema already covers well.

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?

States a precise verb+resource — link a source node's output pin to a target node's input pin — and enumerates the asset families it applies to (Blueprint, material, sound cue, MetaSound, PCG, Control Rig). It explicitly names the siblings it is not (validate_pin_connection, disconnect_pin, build_blueprint_graph), so an agent can route correctly without opening any schema.

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?

Gives explicit sequencing ('Use it after add_graph_node, or on nodes that get_graph_nodes lists'), a three-way exclusion list with the alternative tool named for each case, and a runtime precondition (refused during Play-in-Editor, force=true to override). Nothing about when to select this tool is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.