connect_shader_nodes
Connects shader node sockets within a Blender material or world graph, linking a source output to a destination input to build or adjust node networks.
Instructions
Manipulate shader node graphs for materials or world environments. Supports creating nodes, removing nodes, connecting sockets, disconnecting sockets, setting socket/node properties, and listing existing node networks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target_name": "<target_name>"
},
"name": "connect_shader_nodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Node graph action to perform. | create_node |
| task_id | No | Optional task or workflow identifier. | |
| to_node | No | Destination node name for connection/disconnection. | |
| approved | No | DEPRECATED / UNTRUSTED: Client-supplied approval flags in tool arguments are not trusted as proof of human consent. | |
| location | No | Optional [x, y] coordinates in the Node Editor canvas. | |
| from_node | No | Source node name for connection/disconnection. | |
| node_name | No | Name or identifier of the node for creation, removal, or property updates. | |
| node_type | No | Blender shader node RNA type (e.g., ShaderNodeTexImage, ShaderNodeMapping, ShaderNodeTexCoord, ShaderNodeMath). | |
| to_socket | No | Destination input socket name or index. | |
| from_socket | No | Source output socket name or index. | |
| target_name | Yes | Name of the target Material or World datablock. | |
| target_type | No | Target datablock type (MATERIAL or WORLD). Defaults to MATERIAL. | MATERIAL |
| property_name | No | Property or input socket name when action is set_property. | |
| property_value | No | Value to assign when action is set_property (scalar, string, or array). |