Skip to main content
Glama

connect_shader_graph_nodes

Connect shader graph output and input slots by node IDs, verifying compatibility and occupancy with a content hash to block stale edits during transactional reimport and compile.

Instructions

Connect a real output slot to a real input slot by node object ids returned from inspect_shader_graph. Pass that inspection's contentHash so stale edits fail closed. The bridge verifies directions, compatibility, and that the input is unoccupied before GraphData.Connect, then reimports and compiles transactionally. Set replaceExistingInput=true only to explicitly replace an existing edge.

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": {
      "assetPath": "<assetPath>",
      "sourceNodeId": "<sourceNodeId>",
      "sourceSlotId": "<sourceSlotId>",
      "destinationNodeId": "<destinationNodeId>",
      "destinationSlotId": "<destinationSlotId>",
      "expectedContentHash": "<expectedContentHash>"
    },
    "name": "connect_shader_graph_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetPathYes
sourceNodeIdYes
sourceSlotIdYes
destinationNodeIdYes
destinationSlotIdYes
expectedContentHashYes
replaceExistingInputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses pre-checks (direction, compatibility, unoccupied input), transactional reimport/compile, and fail-closed behavior on a stale contentHash. It does not mention permissions, side effects on existing edges beyond the replace flag, or what the operation returns.

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

Conciseness5/5

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

Three tight sentences, front-loaded with the action and its prerequisite, followed by the validation/transaction behavior, then the single caveat flag. No filler wording and every sentence adds decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, this is nearly complete: validation, transactionality, and stale-hash failure are all covered. A gap remains around the response—particularly whether a new contentHash is returned for chaining further edits—which matters for multi-step graph construction.

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?

Schema description coverage is 0%, so the description must compensate, and it explains the origin and meaning of sourceNodeId/destinationNodeId, sourceSlotId/destinationSlotId, expectedContentHash, and replaceExistingInput. Only assetPath's role goes unstated, though its regex pattern is largely self-documenting.

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?

The description names a specific verb (connect) and precise resources (real output slot to real input slot by node object ids), and ties the ids back to the sibling tool inspect_shader_graph. This clearly separates it from node-creation siblings such as add_shader_graph_node.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a concrete prerequisite workflow (ids and contentHash must come from inspect_shader_graph) and a conditional rule for replaceExistingInput=true. What is missing is explicit routing to an alternative tool, e.g. when to use add_shader_graph_node instead of connecting edges.

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