Skip to main content
Glama

inspect_shader_graph

Deserializes Unity Shader Graph assets via GraphData to report targets, properties, nodes, slot details, edges, positions, unresolved objects, and compiler diagnostics, and can open asset in Unity.

Instructions

Deserialize a Shader Graph through the installed package's GraphData reader and return targets, properties, nodes, real slot ids/directions/types, edges, positions, unresolved objects, and ShaderUtil compiler diagnostics. This never hand-parses or rewrites Shader Graph JSON. It can optionally open the asset in Unity after inspection.

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>"
    },
    "name": "inspect_shader_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetPathYes
openInEditorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

A3.7/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 behavioral burden and does it reasonably well: it discloses the implementation path (installed package's GraphData reader), guarantees it 'never hand-parses or rewrites' JSON, and warns that it can open the asset in Unity as a side effect. Remaining gaps are modest — it doesn't state whether outputs are truncated/paginated or whether unresolved objects block the rest of the result.

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?

Two sentences, front-loaded with the action and its data source, then the non-obvious guarantees and the optional side effect. The long return-value list is dense but each item is informative and none of the wording is filler.

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?

With no output schema and no annotations, the description correctly enumerates the return payload and the read-only guarantee, which is exactly the information an agent needs. A brief note on when to prefer this over the validation sibling is the main thing missing.

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

Parameters3/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 for two undocumented parameters. It clarifies openInEditor's meaning (open the asset after inspection) but says nothing about assetPath beyond what the pattern and required flag already convey, so coverage is only partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — deserialize/inspect a Shader Graph — and enumerates what it returns (targets, properties, nodes, slot ids, edges, diagnostics). This distinguishes it from write-side siblings like connect_shader_graph_nodes or add_shader_graph_node, though it does not explicitly contrast with validate_shader_graph.

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

Usage Guidelines3/5

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

Usage is only implied: 'after inspection' hints that this is a read/analysis step preceding edits, and the optional editor-open implies a follow-up workflow. There is no explicit statement of when to use this versus validate_shader_graph or get_shader_graph_capabilities, and no prerequisites are stated.

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