construct-shader-graph-mcp 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/guidance/skill.md +4 -3
- package/src/server.mjs +7 -16
package/package.json
CHANGED
package/src/guidance/skill.md
CHANGED
|
@@ -124,6 +124,7 @@ Read-only calls:
|
|
|
124
124
|
- `getManifest`
|
|
125
125
|
- `nodes.list`
|
|
126
126
|
- `nodes.get`
|
|
127
|
+
- `nodes.getInfo`
|
|
127
128
|
- `nodes.getPorts`
|
|
128
129
|
- `nodes.search`
|
|
129
130
|
- `nodeTypes.list`
|
|
@@ -223,7 +224,7 @@ This is one of the most important workflows.
|
|
|
223
224
|
|
|
224
225
|
To change a node's editable input values:
|
|
225
226
|
|
|
226
|
-
1. Read the node with `nodes.
|
|
227
|
+
1. Read the node with `nodes.getInfo(nodeId)`.
|
|
227
228
|
2. Inspect `editableInputValues` to see which inputs are editable and currently unconnected.
|
|
228
229
|
3. Edit with `nodes.edit(nodeId, { inputValues: ... })`.
|
|
229
230
|
|
|
@@ -236,10 +237,10 @@ Rules:
|
|
|
236
237
|
|
|
237
238
|
Example workflow:
|
|
238
239
|
|
|
239
|
-
- call `nodes.
|
|
240
|
+
- call `nodes.getInfo(nodeId)`
|
|
240
241
|
- inspect `editableInputValues`
|
|
241
242
|
- call `nodes.edit(nodeId, { inputValues: { B: [0, 0, 0, 1] } })`
|
|
242
|
-
- re-read the node with `nodes.
|
|
243
|
+
- re-read the node with `nodes.getInfo(nodeId)`
|
|
243
244
|
|
|
244
245
|
Name-based example:
|
|
245
246
|
|
package/src/server.mjs
CHANGED
|
@@ -65,7 +65,7 @@ Use MCP tools only.
|
|
|
65
65
|
## Important method patterns
|
|
66
66
|
|
|
67
67
|
- Discover node types: nodeTypes.search, nodeTypes.list, nodeTypes.get
|
|
68
|
-
- Inspect graph: nodes.list, nodes.
|
|
68
|
+
- Inspect graph: nodes.list, nodes.getInfo, nodes.getPorts, wires.getAll, uniforms.list
|
|
69
69
|
- Edit node input values: nodes.edit(nodeId, { inputValues: { PortName: value } })
|
|
70
70
|
- Wire nodes: wires.create({ from, to }) after inspecting both ports
|
|
71
71
|
- Validate: ai.runDebugCheck({ includeScreenshot: true })
|
|
@@ -86,7 +86,7 @@ function getPromptPreamble() {
|
|
|
86
86
|
function getSessionSummary(session) {
|
|
87
87
|
return {
|
|
88
88
|
sessionId: session.sessionId,
|
|
89
|
-
|
|
89
|
+
projectName: session.project?.name || "Untitled Shader",
|
|
90
90
|
connectedAt: session.connectedAt,
|
|
91
91
|
updatedAt: session.updatedAt,
|
|
92
92
|
manifestVersion: session.manifest?.version || null,
|
|
@@ -188,14 +188,7 @@ function createToolDefinitions() {
|
|
|
188
188
|
projects: z.array(
|
|
189
189
|
z.object({
|
|
190
190
|
sessionId: z.string(),
|
|
191
|
-
|
|
192
|
-
name: z.string(),
|
|
193
|
-
version: z.string().optional(),
|
|
194
|
-
author: z.string().optional(),
|
|
195
|
-
category: z.string().optional(),
|
|
196
|
-
description: z.string().optional(),
|
|
197
|
-
shaderInfo: z.any().optional(),
|
|
198
|
-
}),
|
|
191
|
+
projectName: z.string(),
|
|
199
192
|
connectedAt: z.string(),
|
|
200
193
|
updatedAt: z.string(),
|
|
201
194
|
manifestVersion: z.string().nullable(),
|
|
@@ -234,7 +227,7 @@ function createToolDefinitions() {
|
|
|
234
227
|
},
|
|
235
228
|
outputSchema: {
|
|
236
229
|
sessionId: z.string(),
|
|
237
|
-
|
|
230
|
+
projectName: z.string(),
|
|
238
231
|
},
|
|
239
232
|
},
|
|
240
233
|
handler: async ({ sessionId }) => {
|
|
@@ -242,7 +235,7 @@ function createToolDefinitions() {
|
|
|
242
235
|
selectedSessionId = sessionId;
|
|
243
236
|
const result = {
|
|
244
237
|
sessionId,
|
|
245
|
-
|
|
238
|
+
projectName: session.project?.name || "Untitled Shader",
|
|
246
239
|
};
|
|
247
240
|
return {
|
|
248
241
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
@@ -263,7 +256,6 @@ function createToolDefinitions() {
|
|
|
263
256
|
},
|
|
264
257
|
outputSchema: {
|
|
265
258
|
sessionId: z.string(),
|
|
266
|
-
project: z.any(),
|
|
267
259
|
manifest: z.any(),
|
|
268
260
|
},
|
|
269
261
|
},
|
|
@@ -273,7 +265,6 @@ function createToolDefinitions() {
|
|
|
273
265
|
: ensureSelectedSession();
|
|
274
266
|
const result = {
|
|
275
267
|
sessionId: session.sessionId,
|
|
276
|
-
project: session.project,
|
|
277
268
|
manifest: session.manifest,
|
|
278
269
|
};
|
|
279
270
|
return {
|
|
@@ -304,7 +295,7 @@ function createToolDefinitions() {
|
|
|
304
295
|
},
|
|
305
296
|
outputSchema: {
|
|
306
297
|
sessionId: z.string(),
|
|
307
|
-
project: z.any(),
|
|
298
|
+
// project: z.any(),
|
|
308
299
|
method: z.string(),
|
|
309
300
|
args: z.array(z.any()),
|
|
310
301
|
durationMs: z.number(),
|
|
@@ -318,7 +309,7 @@ function createToolDefinitions() {
|
|
|
318
309
|
const response = await invokeSession(session, method, args);
|
|
319
310
|
const result = {
|
|
320
311
|
sessionId: session.sessionId,
|
|
321
|
-
project: session.project,
|
|
312
|
+
// project: session.project,
|
|
322
313
|
method,
|
|
323
314
|
args,
|
|
324
315
|
durationMs: response.durationMs ?? 0,
|