@theprototype/agent 1.56.0 → 1.59.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/catalog.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "format": 2,
4
4
  "generator": {
5
5
  "source": "tpAgent.tools() via core scripts/agent-tool-catalog.cjs, mapped by tools/agent/src/catalog.js",
6
- "hostTools": 45,
6
+ "hostTools": 46,
7
7
  "dropped": []
8
8
  },
9
9
  "instructions": "You are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nWhen the person says \"undo that\" or \"take that back\", call undo_last; if it refuses, say who changed what.\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", \"here\" or \"this\", call where_are_users and build at the spots it gives, facing the person.\nMotion and interaction are flow nodes (create_flow_nodes); call describe_node_types before wiring edges.\nTake a screenshot after each change to check your work.\nWhen asked what you can do here, call what_can_you_do and say its \"say\" line.",
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "name": "list_scene",
22
22
  "title": "Read the scene",
23
- "description": "List every object currently in the scene with its uuid, name, type, parent, transform, material, color and (for a primitive) its shape — geometry {type, sizes such as the thickness of a wall}. The transform is the AUTHORED pose: an object an effect is moving also has animated: true, and live {position, rotation, scale, visible} when this frame differs; update_objects writes the authored pose, so never copy live back into it. Call this before editing so you use real uuids. On a big scene narrow it: brief (uuids + names only), name (a glob), type, near {position, radius}. A big flow graph shows its first page and says how to read the rest: pass {flow: \"scene\" | object uuid, page} to read one page of one graph.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall list_scene before editing so you use real uuids; batch many objects into one call.",
23
+ "description": "List every object currently in the scene with its uuid, name, type, parent, transform, material, color and (for a primitive) its shape — geometry {type, sizes such as the thickness of a wall}. Every mesh also has mesh {vertexCount, faceCount (triangles), bounds {local, world}} — each box [[minX, minY, minZ], [maxX, maxY, maxZ]], local in the mesh's own space (its vertices), world in the scene. The transform is the AUTHORED pose: an object an effect is moving also has animated: true, and live {position, rotation, scale, visible} when this frame differs; update_objects writes the authored pose, so never copy live back into it. Call this before editing so you use real uuids. On a big scene narrow it: brief (uuids + names only), name (a glob), type, near {position, radius}. A big flow graph shows its first page and says how to read the rest: pass {flow: \"scene\" | object uuid, page} to read one page of one graph.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall list_scene before editing so you use real uuids; batch many objects into one call.",
24
24
  "inputSchema": {
25
25
  "type": "object",
26
26
  "properties": {
@@ -75,10 +75,39 @@
75
75
  {
76
76
  "name": "create_objects",
77
77
  "title": "Add objects",
78
- "description": "Create one or more primitives, lights or empty groups in a single call. Ground is the y=0 plane; place objects so they rest ON it (a box of height h sits at y=h/2). Returns the new uuids.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", \"here\" or \"this\", call where_are_users and build at the spots it gives, facing the person.\nTake a screenshot after each change to check your work.",
78
+ "description": "Create one or more primitives, lights or empty groups in a single call. Ground is the y=0 plane; place objects so they rest ON it (a box of height h sits at y=h/2). Returns the new uuids. To copy an existing object instead (a row of fence posts, a ring of chairs), pass from: its uuid, count, offset [x,y,z] between one copy and the next, and optionally randomRot / randomScale with a seed: deep copies (children, materials, flows), one undo step, uuids in order, in the source's own group. lookAt turns an object so its local +Z axis (its front) faces a point or another object, +Y kept up.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", \"here\" or \"this\", call where_are_users and build at the spots it gives, facing the person.\nTake a screenshot after each change to check your work.",
79
79
  "inputSchema": {
80
80
  "type": "object",
81
81
  "properties": {
82
+ "from": {
83
+ "type": "string",
84
+ "description": "copy this object (uuid) instead of making new ones; objects can still be given beside it"
85
+ },
86
+ "count": {
87
+ "type": "integer",
88
+ "description": "with from: how many copies, 1-100 (default 1)"
89
+ },
90
+ "offset": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "number"
94
+ },
95
+ "description": "with from: [x,y,z] metres from one copy to the next, in the source's space (copy i = source + i x offset)"
96
+ },
97
+ "randomRot": {
98
+ "description": "with from: true (any turn about Y), a number (± radians about Y) or [x,y,z] (± radians per axis)"
99
+ },
100
+ "randomScale": {
101
+ "description": "with from: a fraction like 0.2 (sizes 0.8-1.2, uniform) or [min, max] factors"
102
+ },
103
+ "seed": {
104
+ "type": "integer",
105
+ "description": "with from: the same seed makes the same copies (default 1)"
106
+ },
107
+ "name": {
108
+ "type": "string",
109
+ "description": "with from: the copies' name (numbered when several)"
110
+ },
82
111
  "objects": {
83
112
  "type": "array",
84
113
  "items": {
@@ -199,7 +228,7 @@
199
228
  },
200
229
  "castShadow": {
201
230
  "type": "boolean",
202
- "description": "directional/spot/point: cast shadows"
231
+ "description": "meshes and models: cast a shadow (on by default); lights: directional / spot / point cast shadows"
203
232
  },
204
233
  "aim": {
205
234
  "type": "array",
@@ -208,6 +237,13 @@
208
237
  },
209
238
  "description": "directional/spot: a world point [x,y,z] to point at"
210
239
  },
240
+ "receiveShadow": {
241
+ "type": "boolean",
242
+ "description": "meshes and models: shadows fall on it (on by default)"
243
+ },
244
+ "lookAt": {
245
+ "description": "turn it so its local +Z (front) faces this: a world point [x,y,z] or another object's uuid (+Y stays up; lights use aim)"
246
+ },
211
247
  "parentUuid": {
212
248
  "type": "string",
213
249
  "description": "uuid of an existing group to nest under — position/rotation/scale are then LOCAL to that group"
@@ -231,9 +267,7 @@
231
267
  }
232
268
  }
233
269
  },
234
- "required": [
235
- "objects"
236
- ]
270
+ "required": []
237
271
  },
238
272
  "annotations": {
239
273
  "title": "Add objects",
@@ -245,7 +279,7 @@
245
279
  {
246
280
  "name": "update_objects",
247
281
  "title": "Change objects",
248
- "description": "Modify existing objects by uuid: move/rotate/scale, recolor, change material, rename, show/hide, or reparent. Batch many in one call. On an object an effect is moving, a transform sets its authored pose (the one list_scene reports) and the effect carries on from there.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nTake a screenshot after each change to check your work.",
282
+ "description": "Modify existing objects by uuid: move/rotate/scale, recolor, change material, rename, show/hide, shadows (castShadow / receiveShadow), turn to face something (lookAt), or reparent. Batch many in one call. On an object an effect is moving, a transform sets its authored pose (the one list_scene reports) and the effect carries on from there.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nTake a screenshot after each change to check your work.",
249
283
  "inputSchema": {
250
284
  "type": "object",
251
285
  "properties": {
@@ -296,7 +330,7 @@
296
330
  },
297
331
  "materialParams": {
298
332
  "type": "object",
299
- "description": "meshes: numbers (roughness, metalness, opacity, emissiveIntensity, clearcoat, transmission, ior, shininess…, clamped), true/false (wireframe, transparent, flatShading), hex colours (emissive, specular), side (front|back|double), and map = a library image hash (null clears). Each bad key comes back in errors."
333
+ "description": "meshes: numbers (roughness, metalness, opacity, emissiveIntensity, clearcoat, transmission, ior, shininess…, clamped), true/false (wireframe, transparent, flatShading), hex colours (emissive, specular), side (front|back|double), map slots (map, normalMap, roughnessMap, metalnessMap, emissiveMap, aoMap: a library image hash, or null to clear), texTransform ({repeat:[u,v], offset:[u,v], rotation:radians}), and map = a library image hash (null clears). Each bad key comes back in errors."
300
334
  },
301
335
  "intensity": {
302
336
  "type": "number",
@@ -332,7 +366,7 @@
332
366
  },
333
367
  "castShadow": {
334
368
  "type": "boolean",
335
- "description": "directional/spot/point: cast shadows"
369
+ "description": "meshes and models: cast a shadow (on by default); lights: directional / spot / point cast shadows"
336
370
  },
337
371
  "aim": {
338
372
  "type": "array",
@@ -341,6 +375,13 @@
341
375
  },
342
376
  "description": "directional/spot: a world point [x,y,z] to point at"
343
377
  },
378
+ "receiveShadow": {
379
+ "type": "boolean",
380
+ "description": "meshes and models: shadows fall on it (on by default)"
381
+ },
382
+ "lookAt": {
383
+ "description": "turn it so its local +Z (front) faces this: a world point [x,y,z] or another object's uuid (+Y stays up; lights use aim)"
384
+ },
344
385
  "visible": {
345
386
  "type": "boolean"
346
387
  },
@@ -592,7 +633,7 @@
592
633
  "minItems": 3,
593
634
  "maxItems": 3
594
635
  },
595
- "description": "tubes: a new path in scene space"
636
+ "description": "tubes: a new path in the space the tube lives in (the scene, or its group)"
596
637
  },
597
638
  "radius": {
598
639
  "type": "number",
@@ -702,7 +743,7 @@
702
743
  },
703
744
  "parentUuid": {
704
745
  "type": "string",
705
- "description": "group to nest under (position is then local to it)"
746
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
706
747
  },
707
748
  "physics": {
708
749
  "type": "string",
@@ -711,6 +752,14 @@
711
752
  "dynamic"
712
753
  ],
713
754
  "description": "default static"
755
+ },
756
+ "castShadow": {
757
+ "type": "boolean",
758
+ "description": "cast a shadow (on by default)"
759
+ },
760
+ "receiveShadow": {
761
+ "type": "boolean",
762
+ "description": "shadows fall on it (on by default)"
714
763
  }
715
764
  },
716
765
  "required": [
@@ -727,7 +776,7 @@
727
776
  {
728
777
  "name": "create_tube",
729
778
  "title": "Make a tube along a path",
730
- "description": "A tube swept along a smooth 3D path — rail, pipe, cable, handrail, tentacle. path = [[x, y, z], …] in SCENE space (the object is placed at the path's centre); radius for all points or radii per point (tapers). Editable with set_geometry (path, radii, closed). Returns the uuid.\nTake a screenshot after each change to check your work.",
779
+ "description": "A tube swept along a smooth 3D path — rail, pipe, cable, handrail, tentacle. path = [[x, y, z], …] in SCENE space, or in the group's own space with parentUuid (the object is placed at the path's centre); radius for all points or radii per point (tapers). Editable with set_geometry (path, radii, closed). Returns the uuid.\nTake a screenshot after each change to check your work.",
731
780
  "inputSchema": {
732
781
  "type": "object",
733
782
  "properties": {
@@ -770,12 +819,24 @@
770
819
  "type": "string",
771
820
  "description": "hex #rrggbb"
772
821
  },
822
+ "parentUuid": {
823
+ "type": "string",
824
+ "description": "uuid of a group to nest under — path points are then LOCAL to that group, so the tube moves and turns with it"
825
+ },
773
826
  "physics": {
774
827
  "type": "string",
775
828
  "enum": [
776
829
  "static",
777
830
  "dynamic"
778
831
  ]
832
+ },
833
+ "castShadow": {
834
+ "type": "boolean",
835
+ "description": "cast a shadow (on by default)"
836
+ },
837
+ "receiveShadow": {
838
+ "type": "boolean",
839
+ "description": "shadows fall on it (on by default)"
779
840
  }
780
841
  },
781
842
  "required": [
@@ -888,7 +949,7 @@
888
949
  },
889
950
  "parentUuid": {
890
951
  "type": "string",
891
- "description": "group to nest under (position is then local to it)"
952
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
892
953
  },
893
954
  "physics": {
894
955
  "type": "string",
@@ -897,6 +958,14 @@
897
958
  "dynamic"
898
959
  ],
899
960
  "description": "default static"
961
+ },
962
+ "castShadow": {
963
+ "type": "boolean",
964
+ "description": "cast a shadow (on by default)"
965
+ },
966
+ "receiveShadow": {
967
+ "type": "boolean",
968
+ "description": "shadows fall on it (on by default)"
900
969
  }
901
970
  },
902
971
  "required": [
@@ -1102,7 +1171,7 @@
1102
1171
  {
1103
1172
  "name": "create_mesh",
1104
1173
  "title": "Make a mesh from data",
1105
- "description": "A mesh from raw data: vertices [[x, y, z], …] and faces [[i, j, k] or [i, j, k, l] …] (indices into vertices, counter-clockwise seen from outside; polygons of up to 32 corners are fanned, so keep them convex), optional uvs (one [u, v] per vertex). Up to 20000 vertices and 20000 faces; normals are computed (smooth: true for smooth shading). Edit it afterwards with edit_mesh. Returns the uuid.\nTake a screenshot after each change to check your work.",
1174
+ "description": "A mesh from raw data: vertices [[x, y, z], …] and faces [[i, j, k] or [i, j, k, l] …] (indices into vertices, counter-clockwise seen from outside; polygons of up to 32 corners are fanned, so keep them convex), optional uvs (one [u, v] per vertex). Up to 20000 vertices and 20000 faces; normals are computed (smooth: true for smooth shading, flatShading: true for hard facets). Colour it as you make it: materials [{color, roughness, metalness, …}] (up to 16 slots) with faceMaterials [slot per face, same order as faces] for parts in different colours; or colors [[r, g, b] 0-1, one per vertex] for a painted gradient (multiplied by the material colour). Material slots last through edit_mesh; vertex colours last only while an edit keeps the vertex count. Edit it afterwards with edit_mesh. Returns the uuid.\nTake a screenshot after each change to check your work.",
1106
1175
  "inputSchema": {
1107
1176
  "type": "object",
1108
1177
  "properties": {
@@ -1142,6 +1211,74 @@
1142
1211
  "smooth": {
1143
1212
  "type": "boolean"
1144
1213
  },
1214
+ "flatShading": {
1215
+ "type": "boolean",
1216
+ "description": "true = one flat normal per triangle (low-poly look)"
1217
+ },
1218
+ "colors": {
1219
+ "type": "array",
1220
+ "items": {
1221
+ "type": "array",
1222
+ "items": {
1223
+ "type": "number"
1224
+ },
1225
+ "minItems": 3,
1226
+ "maxItems": 3
1227
+ },
1228
+ "maxItems": 20000,
1229
+ "description": "one [r, g, b] (0-1) per vertex, in the order of vertices"
1230
+ },
1231
+ "materials": {
1232
+ "type": "array",
1233
+ "minItems": 1,
1234
+ "maxItems": 16,
1235
+ "description": "material slots faceMaterials points into",
1236
+ "items": {
1237
+ "type": "object",
1238
+ "properties": {
1239
+ "color": {
1240
+ "type": "string",
1241
+ "description": "hex like \"#aa6633\""
1242
+ },
1243
+ "roughness": {
1244
+ "type": "number",
1245
+ "minimum": 0,
1246
+ "maximum": 1
1247
+ },
1248
+ "metalness": {
1249
+ "type": "number",
1250
+ "minimum": 0,
1251
+ "maximum": 1
1252
+ },
1253
+ "opacity": {
1254
+ "type": "number",
1255
+ "minimum": 0,
1256
+ "maximum": 1
1257
+ },
1258
+ "emissive": {
1259
+ "type": "string",
1260
+ "description": "hex glow colour"
1261
+ },
1262
+ "emissiveIntensity": {
1263
+ "type": "number",
1264
+ "minimum": 0,
1265
+ "maximum": 100
1266
+ },
1267
+ "name": {
1268
+ "type": "string"
1269
+ }
1270
+ }
1271
+ }
1272
+ },
1273
+ "faceMaterials": {
1274
+ "type": "array",
1275
+ "items": {
1276
+ "type": "integer",
1277
+ "minimum": 0
1278
+ },
1279
+ "maxItems": 20000,
1280
+ "description": "the materials slot of each face (0 = the first), one per face"
1281
+ },
1145
1282
  "name": {
1146
1283
  "type": "string"
1147
1284
  },
@@ -1176,7 +1313,7 @@
1176
1313
  },
1177
1314
  "parentUuid": {
1178
1315
  "type": "string",
1179
- "description": "group to nest under (position is then local to it)"
1316
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
1180
1317
  },
1181
1318
  "physics": {
1182
1319
  "type": "string",
@@ -1185,6 +1322,14 @@
1185
1322
  "dynamic"
1186
1323
  ],
1187
1324
  "description": "default static"
1325
+ },
1326
+ "castShadow": {
1327
+ "type": "boolean",
1328
+ "description": "cast a shadow (on by default)"
1329
+ },
1330
+ "receiveShadow": {
1331
+ "type": "boolean",
1332
+ "description": "shadows fall on it (on by default)"
1188
1333
  }
1189
1334
  },
1190
1335
  "required": [
@@ -1199,10 +1344,67 @@
1199
1344
  "openWorldHint": false
1200
1345
  }
1201
1346
  },
1347
+ {
1348
+ "name": "create_shapes",
1349
+ "title": "Create shapes",
1350
+ "description": "Make up to 50 shapes in ONE call and ONE undo step: shapes = [{action: \"mesh\", mesh: {…create_mesh's fields…}}, {action: \"lathe\", lathe: {…}}, …] with action one of lathe, tube, extrude, mesh (the same fields as create_mesh / create_lathe / extrude_shape / create_tube, parentUuid included). Every entry is checked first and nothing is made if one is wrong (the error names its index, shapes[3]); the uuids come back in the order given.\nTake a screenshot after each change to check your work.",
1351
+ "inputSchema": {
1352
+ "type": "object",
1353
+ "properties": {
1354
+ "shapes": {
1355
+ "type": "array",
1356
+ "minItems": 1,
1357
+ "maxItems": 50,
1358
+ "items": {
1359
+ "type": "object",
1360
+ "properties": {
1361
+ "action": {
1362
+ "type": "string",
1363
+ "enum": [
1364
+ "lathe",
1365
+ "tube",
1366
+ "extrude",
1367
+ "mesh"
1368
+ ]
1369
+ },
1370
+ "lathe": {
1371
+ "type": "object",
1372
+ "description": "create_lathe's fields"
1373
+ },
1374
+ "tube": {
1375
+ "type": "object",
1376
+ "description": "create_tube's fields"
1377
+ },
1378
+ "extrude": {
1379
+ "type": "object",
1380
+ "description": "extrude_shape's fields"
1381
+ },
1382
+ "mesh": {
1383
+ "type": "object",
1384
+ "description": "create_mesh's fields"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "action"
1389
+ ]
1390
+ }
1391
+ }
1392
+ },
1393
+ "required": [
1394
+ "shapes"
1395
+ ]
1396
+ },
1397
+ "annotations": {
1398
+ "title": "Create shapes",
1399
+ "readOnlyHint": false,
1400
+ "destructiveHint": true,
1401
+ "openWorldHint": false
1402
+ }
1403
+ },
1202
1404
  {
1203
1405
  "name": "set_material",
1204
1406
  "title": "Change materials and textures",
1205
- "description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by name (Poly Haven / ambientCG); preset applies a named preset. faces gives just those faces their own new material slot. One undo step.\nTake a screenshot after each change to check your work.",
1407
+ "description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or one the person saved (list_materials lists them all). faces gives just those faces their own new material slot. One undo step.\nTake a screenshot after each change to check your work.",
1206
1408
  "inputSchema": {
1207
1409
  "type": "object",
1208
1410
  "properties": {
@@ -1306,11 +1508,11 @@
1306
1508
  },
1307
1509
  "preset": {
1308
1510
  "type": "string",
1309
- "description": "a preset name from list_materials"
1511
+ "description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or a saved one list_materials names"
1310
1512
  },
1311
1513
  "cc0": {
1312
1514
  "type": "string",
1313
- "description": "a CC0 material by name, e.g. \"Wood051\" or \"brown planks\""
1515
+ "description": "a CC0 material by Poly Haven name, ambientCG id (\"Wood051\", \"Bricks076\", \"Metal032\") or words (\"brown planks\")"
1314
1516
  },
1315
1517
  "slot": {
1316
1518
  "type": "integer",
@@ -1336,7 +1538,7 @@
1336
1538
  {
1337
1539
  "name": "list_materials",
1338
1540
  "title": "Read materials",
1339
- "description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names and shader keys. Read this before editing.",
1541
+ "description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, and any the person saved) and shader keys. Read this before editing.",
1340
1542
  "inputSchema": {
1341
1543
  "type": "object",
1342
1544
  "properties": {
@@ -1886,7 +2088,7 @@
1886
2088
  {
1887
2089
  "name": "create_pivot",
1888
2090
  "title": "Make a pivot group",
1889
- "description": "Make a group at a point and put objects in it, so turning the group swings them about that point: arm parts about a shoulder, several parts of a lamp about one joint. The objects stay where they are. For one object, set_pivot needs no extra group. Returns groupUuid.\nTake a screenshot after each change to check your work.",
2091
+ "description": "Make a group at a point and put objects in it, so turning the group swings them about that point: arm parts about a shoulder, several parts of a lamp about one joint. The objects stay where they are. Give the point as at (world) or local (in the group the objects are already in — the numbers list_scene shows inside it). For one object, set_pivot needs no extra group. Returns groupUuid.\nTake a screenshot after each change to check your work.",
1890
2092
  "inputSchema": {
1891
2093
  "type": "object",
1892
2094
  "properties": {
@@ -1901,14 +2103,22 @@
1901
2103
  "at": {
1902
2104
  "description": "the point: [x,y,z] world metres, or \"center\" / \"bottom\" / \"top\" of the objects together"
1903
2105
  },
2106
+ "local": {
2107
+ "type": "array",
2108
+ "items": {
2109
+ "type": "number"
2110
+ },
2111
+ "minItems": 3,
2112
+ "maxItems": 3,
2113
+ "description": "instead of at: [x,y,z] in the space of the group the objects are in (world space at the scene root)"
2114
+ },
1904
2115
  "name": {
1905
2116
  "type": "string",
1906
2117
  "description": "the group's name (default \"Pivot\")"
1907
2118
  }
1908
2119
  },
1909
2120
  "required": [
1910
- "objects",
1911
- "at"
2121
+ "objects"
1912
2122
  ]
1913
2123
  },
1914
2124
  "annotations": {
@@ -2826,7 +3036,7 @@
2826
3036
  {
2827
3037
  "name": "status",
2828
3038
  "title": "Session status",
2829
- "description": "Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing.\nYou are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.",
3039
+ "description": "Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing. sceneBudget says how heavy the scene is: objects, triangles (per frame drawn; the scene's own count while the view is idle, then no draw calls), draw calls, textures, lights you placed, frame time p95, tier green / amber / red on the desktop or vr profile, and over = each budget past green (build lighter, or stop adding, while it is not green).\nYou are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.",
2830
3040
  "inputSchema": {
2831
3041
  "type": "object",
2832
3042
  "properties": {}
@@ -3020,7 +3230,8 @@
3020
3230
  "lathe": "create_lathe",
3021
3231
  "tube": "create_tube",
3022
3232
  "extrude": "extrude_shape",
3023
- "mesh": "create_mesh"
3233
+ "mesh": "create_mesh",
3234
+ "shapes": "create_shapes"
3024
3235
  },
3025
3236
  "edit_shape": {
3026
3237
  "params": "set_geometry",
@@ -3050,7 +3261,7 @@
3050
3261
  {
3051
3262
  "name": "list_scene",
3052
3263
  "title": "Read the scene",
3053
- "description": "List every object currently in the scene with its uuid, name, type, parent, transform, material, color and (for a primitive) its shape — geometry {type, sizes such as the thickness of a wall}. The transform is the AUTHORED pose: an object an effect is moving also has animated: true, and live {position, rotation, scale, visible} when this frame differs; update_objects writes the authored pose, so never copy live back into it. Call this before editing so you use real uuids. On a big scene narrow it: brief (uuids + names only), name (a glob), type, near {position, radius}. A big flow graph shows its first page and says how to read the rest: pass {flow: \"scene\" | object uuid, page} to read one page of one graph.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall list_scene before editing so you use real uuids; batch many objects into one call.",
3264
+ "description": "List every object currently in the scene with its uuid, name, type, parent, transform, material, color and (for a primitive) its shape — geometry {type, sizes such as the thickness of a wall}. Every mesh also has mesh {vertexCount, faceCount (triangles), bounds {local, world}} — each box [[minX, minY, minZ], [maxX, maxY, maxZ]], local in the mesh's own space (its vertices), world in the scene. The transform is the AUTHORED pose: an object an effect is moving also has animated: true, and live {position, rotation, scale, visible} when this frame differs; update_objects writes the authored pose, so never copy live back into it. Call this before editing so you use real uuids. On a big scene narrow it: brief (uuids + names only), name (a glob), type, near {position, radius}. A big flow graph shows its first page and says how to read the rest: pass {flow: \"scene\" | object uuid, page} to read one page of one graph.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall list_scene before editing so you use real uuids; batch many objects into one call.",
3054
3265
  "inputSchema": {
3055
3266
  "type": "object",
3056
3267
  "properties": {
@@ -3105,10 +3316,39 @@
3105
3316
  {
3106
3317
  "name": "create_objects",
3107
3318
  "title": "Add objects",
3108
- "description": "Create one or more primitives, lights or empty groups in a single call. Ground is the y=0 plane; place objects so they rest ON it (a box of height h sits at y=h/2). Returns the new uuids.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", \"here\" or \"this\", call where_are_users and build at the spots it gives, facing the person.\nTake a screenshot after each change to check your work.",
3319
+ "description": "Create one or more primitives, lights or empty groups in a single call. Ground is the y=0 plane; place objects so they rest ON it (a box of height h sits at y=h/2). Returns the new uuids. To copy an existing object instead (a row of fence posts, a ring of chairs), pass from: its uuid, count, offset [x,y,z] between one copy and the next, and optionally randomRot / randomScale with a seed: deep copies (children, materials, flows), one undo step, uuids in order, in the source's own group. lookAt turns an object so its local +Z axis (its front) faces a point or another object, +Y kept up.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nFor \"in front of me\", \"here\" or \"this\", call where_are_users and build at the spots it gives, facing the person.\nTake a screenshot after each change to check your work.",
3109
3320
  "inputSchema": {
3110
3321
  "type": "object",
3111
3322
  "properties": {
3323
+ "from": {
3324
+ "type": "string",
3325
+ "description": "copy this object (uuid) instead of making new ones; objects can still be given beside it"
3326
+ },
3327
+ "count": {
3328
+ "type": "integer",
3329
+ "description": "with from: how many copies, 1-100 (default 1)"
3330
+ },
3331
+ "offset": {
3332
+ "type": "array",
3333
+ "items": {
3334
+ "type": "number"
3335
+ },
3336
+ "description": "with from: [x,y,z] metres from one copy to the next, in the source's space (copy i = source + i x offset)"
3337
+ },
3338
+ "randomRot": {
3339
+ "description": "with from: true (any turn about Y), a number (± radians about Y) or [x,y,z] (± radians per axis)"
3340
+ },
3341
+ "randomScale": {
3342
+ "description": "with from: a fraction like 0.2 (sizes 0.8-1.2, uniform) or [min, max] factors"
3343
+ },
3344
+ "seed": {
3345
+ "type": "integer",
3346
+ "description": "with from: the same seed makes the same copies (default 1)"
3347
+ },
3348
+ "name": {
3349
+ "type": "string",
3350
+ "description": "with from: the copies' name (numbered when several)"
3351
+ },
3112
3352
  "objects": {
3113
3353
  "type": "array",
3114
3354
  "items": {
@@ -3229,7 +3469,7 @@
3229
3469
  },
3230
3470
  "castShadow": {
3231
3471
  "type": "boolean",
3232
- "description": "directional/spot/point: cast shadows"
3472
+ "description": "meshes and models: cast a shadow (on by default); lights: directional / spot / point cast shadows"
3233
3473
  },
3234
3474
  "aim": {
3235
3475
  "type": "array",
@@ -3238,6 +3478,13 @@
3238
3478
  },
3239
3479
  "description": "directional/spot: a world point [x,y,z] to point at"
3240
3480
  },
3481
+ "receiveShadow": {
3482
+ "type": "boolean",
3483
+ "description": "meshes and models: shadows fall on it (on by default)"
3484
+ },
3485
+ "lookAt": {
3486
+ "description": "turn it so its local +Z (front) faces this: a world point [x,y,z] or another object's uuid (+Y stays up; lights use aim)"
3487
+ },
3241
3488
  "parentUuid": {
3242
3489
  "type": "string",
3243
3490
  "description": "uuid of an existing group to nest under — position/rotation/scale are then LOCAL to that group"
@@ -3261,9 +3508,7 @@
3261
3508
  }
3262
3509
  }
3263
3510
  },
3264
- "required": [
3265
- "objects"
3266
- ]
3511
+ "required": []
3267
3512
  },
3268
3513
  "annotations": {
3269
3514
  "title": "Add objects",
@@ -3275,7 +3520,7 @@
3275
3520
  {
3276
3521
  "name": "update_objects",
3277
3522
  "title": "Change objects",
3278
- "description": "Modify existing objects by uuid: move/rotate/scale, recolor, change material, rename, show/hide, or reparent. Batch many in one call. On an object an effect is moving, a transform sets its authored pose (the one list_scene reports) and the effect carries on from there.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nTake a screenshot after each change to check your work.",
3523
+ "description": "Modify existing objects by uuid: move/rotate/scale, recolor, change material, rename, show/hide, shadows (castShadow / receiveShadow), turn to face something (lookAt), or reparent. Batch many in one call. On an object an effect is moving, a transform sets its authored pose (the one list_scene reports) and the effect carries on from there.\nCall list_scene before editing so you use real uuids; batch many objects into one call.\nTake a screenshot after each change to check your work.",
3279
3524
  "inputSchema": {
3280
3525
  "type": "object",
3281
3526
  "properties": {
@@ -3326,7 +3571,7 @@
3326
3571
  },
3327
3572
  "materialParams": {
3328
3573
  "type": "object",
3329
- "description": "meshes: numbers (roughness, metalness, opacity, emissiveIntensity, clearcoat, transmission, ior, shininess…, clamped), true/false (wireframe, transparent, flatShading), hex colours (emissive, specular), side (front|back|double), and map = a library image hash (null clears). Each bad key comes back in errors."
3574
+ "description": "meshes: numbers (roughness, metalness, opacity, emissiveIntensity, clearcoat, transmission, ior, shininess…, clamped), true/false (wireframe, transparent, flatShading), hex colours (emissive, specular), side (front|back|double), map slots (map, normalMap, roughnessMap, metalnessMap, emissiveMap, aoMap: a library image hash, or null to clear), texTransform ({repeat:[u,v], offset:[u,v], rotation:radians}), and map = a library image hash (null clears). Each bad key comes back in errors."
3330
3575
  },
3331
3576
  "intensity": {
3332
3577
  "type": "number",
@@ -3362,7 +3607,7 @@
3362
3607
  },
3363
3608
  "castShadow": {
3364
3609
  "type": "boolean",
3365
- "description": "directional/spot/point: cast shadows"
3610
+ "description": "meshes and models: cast a shadow (on by default); lights: directional / spot / point cast shadows"
3366
3611
  },
3367
3612
  "aim": {
3368
3613
  "type": "array",
@@ -3371,6 +3616,13 @@
3371
3616
  },
3372
3617
  "description": "directional/spot: a world point [x,y,z] to point at"
3373
3618
  },
3619
+ "receiveShadow": {
3620
+ "type": "boolean",
3621
+ "description": "meshes and models: shadows fall on it (on by default)"
3622
+ },
3623
+ "lookAt": {
3624
+ "description": "turn it so its local +Z (front) faces this: a world point [x,y,z] or another object's uuid (+Y stays up; lights use aim)"
3625
+ },
3374
3626
  "visible": {
3375
3627
  "type": "boolean"
3376
3628
  },
@@ -3568,7 +3820,7 @@
3568
3820
  {
3569
3821
  "name": "create_shape",
3570
3822
  "title": "Make a shape",
3571
- "description": "Make shapes the basic objects cannot: a lathe (a vase, a bowl, a lamp from a profile turned around an axis), a tube along a path (a rail, a pipe, a cable), an extruded outline (a sign, a star, a wall with a hole), or a mesh from your own vertices (anything else).\nCall it as {\"action\": \"lathe\", \"lathe\": {…its fields…}}; each action's fields and limits are in its object below.\nTake a screenshot after each change to check your work.",
3823
+ "description": "Make shapes the basic objects cannot: a lathe (a vase, a bowl, a lamp from a profile turned around an axis), a tube along a path (a rail, a pipe, a cable), an extruded outline (a sign, a star, a wall with a hole), or a mesh from your own vertices (anything else).\nCall it as {\"action\": \"lathe\", \"lathe\": {…its fields…}}; each action's fields and limits are in its object below.\nMany at once: {\"shapes\": [{\"action\": \"lathe\", \"lathe\": {…}}, …]} with no action — one call, one undo step.\nTake a screenshot after each change to check your work.",
3572
3824
  "inputSchema": {
3573
3825
  "type": "object",
3574
3826
  "properties": {
@@ -3645,7 +3897,7 @@
3645
3897
  },
3646
3898
  "parentUuid": {
3647
3899
  "type": "string",
3648
- "description": "group to nest under (position is then local to it)"
3900
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
3649
3901
  },
3650
3902
  "physics": {
3651
3903
  "type": "string",
@@ -3654,6 +3906,14 @@
3654
3906
  "dynamic"
3655
3907
  ],
3656
3908
  "description": "default static"
3909
+ },
3910
+ "castShadow": {
3911
+ "type": "boolean",
3912
+ "description": "cast a shadow (on by default)"
3913
+ },
3914
+ "receiveShadow": {
3915
+ "type": "boolean",
3916
+ "description": "shadows fall on it (on by default)"
3657
3917
  }
3658
3918
  },
3659
3919
  "required": [
@@ -3703,18 +3963,30 @@
3703
3963
  "type": "string",
3704
3964
  "description": "hex #rrggbb"
3705
3965
  },
3966
+ "parentUuid": {
3967
+ "type": "string",
3968
+ "description": "uuid of a group to nest under — path points are then LOCAL to that group, so the tube moves and turns with it"
3969
+ },
3706
3970
  "physics": {
3707
3971
  "type": "string",
3708
3972
  "enum": [
3709
3973
  "static",
3710
3974
  "dynamic"
3711
3975
  ]
3976
+ },
3977
+ "castShadow": {
3978
+ "type": "boolean",
3979
+ "description": "cast a shadow (on by default)"
3980
+ },
3981
+ "receiveShadow": {
3982
+ "type": "boolean",
3983
+ "description": "shadows fall on it (on by default)"
3712
3984
  }
3713
3985
  },
3714
3986
  "required": [
3715
3987
  "path"
3716
3988
  ],
3717
- "description": "A tube swept along a smooth 3D path — rail, pipe, cable, handrail, tentacle. path = [[x, y, z], …] in SCENE space (the object is placed at the path's centre); radius for all points or radii per point (tapers). Editable with edit_shape {action: 'params'} (path, radii, closed). Returns the uuid."
3989
+ "description": "A tube swept along a smooth 3D path — rail, pipe, cable, handrail, tentacle. path = [[x, y, z], …] in SCENE space, or in the group's own space with parentUuid (the object is placed at the path's centre); radius for all points or radii per point (tapers). Editable with edit_shape {action: 'params'} (path, radii, closed). Returns the uuid."
3718
3990
  },
3719
3991
  "extrude": {
3720
3992
  "type": "object",
@@ -3811,7 +4083,7 @@
3811
4083
  },
3812
4084
  "parentUuid": {
3813
4085
  "type": "string",
3814
- "description": "group to nest under (position is then local to it)"
4086
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
3815
4087
  },
3816
4088
  "physics": {
3817
4089
  "type": "string",
@@ -3820,6 +4092,14 @@
3820
4092
  "dynamic"
3821
4093
  ],
3822
4094
  "description": "default static"
4095
+ },
4096
+ "castShadow": {
4097
+ "type": "boolean",
4098
+ "description": "cast a shadow (on by default)"
4099
+ },
4100
+ "receiveShadow": {
4101
+ "type": "boolean",
4102
+ "description": "shadows fall on it (on by default)"
3823
4103
  }
3824
4104
  },
3825
4105
  "required": [
@@ -3866,6 +4146,74 @@
3866
4146
  "smooth": {
3867
4147
  "type": "boolean"
3868
4148
  },
4149
+ "flatShading": {
4150
+ "type": "boolean",
4151
+ "description": "true = one flat normal per triangle (low-poly look)"
4152
+ },
4153
+ "colors": {
4154
+ "type": "array",
4155
+ "items": {
4156
+ "type": "array",
4157
+ "items": {
4158
+ "type": "number"
4159
+ },
4160
+ "minItems": 3,
4161
+ "maxItems": 3
4162
+ },
4163
+ "maxItems": 20000,
4164
+ "description": "one [r, g, b] (0-1) per vertex, in the order of vertices"
4165
+ },
4166
+ "materials": {
4167
+ "type": "array",
4168
+ "minItems": 1,
4169
+ "maxItems": 16,
4170
+ "description": "material slots faceMaterials points into",
4171
+ "items": {
4172
+ "type": "object",
4173
+ "properties": {
4174
+ "color": {
4175
+ "type": "string",
4176
+ "description": "hex like \"#aa6633\""
4177
+ },
4178
+ "roughness": {
4179
+ "type": "number",
4180
+ "minimum": 0,
4181
+ "maximum": 1
4182
+ },
4183
+ "metalness": {
4184
+ "type": "number",
4185
+ "minimum": 0,
4186
+ "maximum": 1
4187
+ },
4188
+ "opacity": {
4189
+ "type": "number",
4190
+ "minimum": 0,
4191
+ "maximum": 1
4192
+ },
4193
+ "emissive": {
4194
+ "type": "string",
4195
+ "description": "hex glow colour"
4196
+ },
4197
+ "emissiveIntensity": {
4198
+ "type": "number",
4199
+ "minimum": 0,
4200
+ "maximum": 100
4201
+ },
4202
+ "name": {
4203
+ "type": "string"
4204
+ }
4205
+ }
4206
+ }
4207
+ },
4208
+ "faceMaterials": {
4209
+ "type": "array",
4210
+ "items": {
4211
+ "type": "integer",
4212
+ "minimum": 0
4213
+ },
4214
+ "maxItems": 20000,
4215
+ "description": "the materials slot of each face (0 = the first), one per face"
4216
+ },
3869
4217
  "name": {
3870
4218
  "type": "string"
3871
4219
  },
@@ -3900,7 +4248,7 @@
3900
4248
  },
3901
4249
  "parentUuid": {
3902
4250
  "type": "string",
3903
- "description": "group to nest under (position is then local to it)"
4251
+ "description": "uuid of a group to nest under — position / rotation / scale AND the shape's own points are then LOCAL to that group (no position = the group's origin), so the part moves and turns with it"
3904
4252
  },
3905
4253
  "physics": {
3906
4254
  "type": "string",
@@ -3909,23 +4257,67 @@
3909
4257
  "dynamic"
3910
4258
  ],
3911
4259
  "description": "default static"
4260
+ },
4261
+ "castShadow": {
4262
+ "type": "boolean",
4263
+ "description": "cast a shadow (on by default)"
4264
+ },
4265
+ "receiveShadow": {
4266
+ "type": "boolean",
4267
+ "description": "shadows fall on it (on by default)"
3912
4268
  }
3913
4269
  },
3914
4270
  "required": [
3915
4271
  "vertices",
3916
4272
  "faces"
3917
4273
  ],
3918
- "description": "A mesh from raw data: vertices [[x, y, z], …] and faces [[i, j, k] or [i, j, k, l] …] (indices into vertices, counter-clockwise seen from outside; polygons of up to 32 corners are fanned, so keep them convex), optional uvs (one [u, v] per vertex). Up to 20000 vertices and 20000 faces; normals are computed (smooth: true for smooth shading). Edit it afterwards with edit_shape {action: 'mesh'}. Returns the uuid."
4274
+ "description": "A mesh from raw data: vertices [[x, y, z], …] and faces [[i, j, k] or [i, j, k, l] …] (indices into vertices, counter-clockwise seen from outside; polygons of up to 32 corners are fanned, so keep them convex), optional uvs (one [u, v] per vertex). Up to 20000 vertices and 20000 faces; normals are computed (smooth: true for smooth shading, flatShading: true for hard facets). Colour it as you make it: materials [{color, roughness, metalness, …}] (up to 16 slots) with faceMaterials [slot per face, same order as faces] for parts in different colours; or colors [[r, g, b] 0-1, one per vertex] for a painted gradient (multiplied by the material colour). Material slots last through edit_shape {action: 'mesh'}; vertex colours last only while an edit keeps the vertex count. Edit it afterwards with edit_shape {action: 'mesh'}. Returns the uuid."
4275
+ },
4276
+ "shapes": {
4277
+ "type": "array",
4278
+ "minItems": 1,
4279
+ "maxItems": 50,
4280
+ "items": {
4281
+ "type": "object",
4282
+ "properties": {
4283
+ "action": {
4284
+ "type": "string",
4285
+ "enum": [
4286
+ "lathe",
4287
+ "tube",
4288
+ "extrude",
4289
+ "mesh"
4290
+ ]
4291
+ },
4292
+ "lathe": {
4293
+ "type": "object",
4294
+ "description": "create_lathe's fields"
4295
+ },
4296
+ "tube": {
4297
+ "type": "object",
4298
+ "description": "create_tube's fields"
4299
+ },
4300
+ "extrude": {
4301
+ "type": "object",
4302
+ "description": "extrude_shape's fields"
4303
+ },
4304
+ "mesh": {
4305
+ "type": "object",
4306
+ "description": "create_mesh's fields"
4307
+ }
4308
+ },
4309
+ "required": [
4310
+ "action"
4311
+ ]
4312
+ },
4313
+ "description": "Make up to 50 shapes in ONE call and ONE undo step: shapes = [{action: \"mesh\", mesh: {…create_shape {action: 'mesh'}'s fields…}}, {action: \"lathe\", lathe: {…}}, …] with action one of lathe, tube, extrude, mesh (the same fields as create_shape {action: 'mesh'} / create_shape {action: 'lathe'} / create_shape {action: 'extrude'} / create_shape {action: 'tube'}, parentUuid included). Every entry is checked first and nothing is made if one is wrong (the error names its index, shapes[3]); the uuids come back in the order given."
3919
4314
  }
3920
- },
3921
- "required": [
3922
- "action"
3923
- ]
4315
+ }
3924
4316
  },
3925
4317
  "annotations": {
3926
4318
  "title": "Make a shape",
3927
4319
  "readOnlyHint": false,
3928
- "destructiveHint": false,
4320
+ "destructiveHint": true,
3929
4321
  "openWorldHint": false
3930
4322
  }
3931
4323
  },
@@ -3999,7 +4391,7 @@
3999
4391
  "minItems": 3,
4000
4392
  "maxItems": 3
4001
4393
  },
4002
- "description": "tubes: a new path in scene space"
4394
+ "description": "tubes: a new path in the space the tube lives in (the scene, or its group)"
4003
4395
  },
4004
4396
  "radius": {
4005
4397
  "type": "number",
@@ -4282,16 +4674,24 @@
4282
4674
  "at": {
4283
4675
  "description": "the point: [x,y,z] world metres, or \"center\" / \"bottom\" / \"top\" of the objects together"
4284
4676
  },
4677
+ "local": {
4678
+ "type": "array",
4679
+ "items": {
4680
+ "type": "number"
4681
+ },
4682
+ "minItems": 3,
4683
+ "maxItems": 3,
4684
+ "description": "instead of at: [x,y,z] in the space of the group the objects are in (world space at the scene root)"
4685
+ },
4285
4686
  "name": {
4286
4687
  "type": "string",
4287
4688
  "description": "the group's name (default \"Pivot\")"
4288
4689
  }
4289
4690
  },
4290
4691
  "required": [
4291
- "objects",
4292
- "at"
4692
+ "objects"
4293
4693
  ],
4294
- "description": "Make a group at a point and put objects in it, so turning the group swings them about that point: arm parts about a shoulder, several parts of a lamp about one joint. The objects stay where they are. For one object, edit_shape {action: 'pivot'} needs no extra group. Returns groupUuid."
4694
+ "description": "Make a group at a point and put objects in it, so turning the group swings them about that point: arm parts about a shoulder, several parts of a lamp about one joint. The objects stay where they are. Give the point as at (world) or local (in the group the objects are already in — the numbers list_scene shows inside it). For one object, edit_shape {action: 'pivot'} needs no extra group. Returns groupUuid."
4295
4695
  }
4296
4696
  },
4297
4697
  "required": [
@@ -4433,11 +4833,11 @@
4433
4833
  },
4434
4834
  "preset": {
4435
4835
  "type": "string",
4436
- "description": "a preset name from list_materials"
4836
+ "description": "a preset: Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or a saved one list_materials names"
4437
4837
  },
4438
4838
  "cc0": {
4439
4839
  "type": "string",
4440
- "description": "a CC0 material by name, e.g. \"Wood051\" or \"brown planks\""
4840
+ "description": "a CC0 material by Poly Haven name, ambientCG id (\"Wood051\", \"Bricks076\", \"Metal032\") or words (\"brown planks\")"
4441
4841
  },
4442
4842
  "slot": {
4443
4843
  "type": "integer",
@@ -4452,7 +4852,7 @@
4452
4852
  "required": [
4453
4853
  "objects"
4454
4854
  ],
4455
- "description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by name (Poly Haven / ambientCG); preset applies a named preset. faces gives just those faces their own new material slot. One undo step."
4855
+ "description": "Make objects look finished: colour, roughness, metalness, emissive, opacity and texture maps, on many objects in one call. Maps take a library image hash or an https URL (https only, CORS-enabled, 16 MB, PNG/JPEG/WebP/GIF/AVIF; it becomes a library item first and is re-encoded like an upload; returned in assets). cc0 fetches a free CC0 material by id or name from Poly Haven (its texture names) or ambientCG (ids like \"Wood051\", \"Bricks076\", \"Metal032\", \"Ground037\"), or by words (\"brown planks\"); preset applies a named preset: one of Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, or one the person saved (set_look {action: 'list_materials'} lists them all). faces gives just those faces their own new material slot. One undo step."
4456
4856
  },
4457
4857
  "list_materials": {
4458
4858
  "type": "object",
@@ -4479,7 +4879,7 @@
4479
4879
  "maximum": 200
4480
4880
  }
4481
4881
  },
4482
- "description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names and shader keys. Read this before editing."
4882
+ "description": "What objects wear: per object its material slots (type, colour, numbers, which maps) and shader, plus the preset names (the starters Wood, Metal, Plastic, Glass, Stone, Rubber, Fish scales, Neon, and any the person saved) and shader keys. Read this before editing."
4483
4883
  },
4484
4884
  "get_material": {
4485
4885
  "type": "object",
@@ -5771,7 +6171,7 @@
5771
6171
  {
5772
6172
  "name": "status",
5773
6173
  "title": "Session status",
5774
- "description": "Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing.\nYou are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.",
6174
+ "description": "Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing. sceneBudget says how heavy the scene is: objects, triangles (per frame drawn; the scene's own count while the view is idle, then no draw calls), draw calls, textures, lights you placed, frame time p95, tier green / amber / red on the desktop or vr profile, and over = each budget past green (build lighter, or stop adding, while it is not green).\nYou are building in the person's own open theprototype.app tab: a live, shared 3D scene. Every change shows for everyone in the session and can be undone.\nThis may be a VOICE conversation: answer in one or two short spoken sentences and say what changed in plain words (\"Added three trees by the fire\"). Never read out uuids, lists of numbers or JSON.\nIf a tool says the tab is closed or not connected, tell the person to open theprototype.app and press Connect Claude, then wait; do not retry in a loop.\nCall status first: it says whether you may edit (a viewer can only look).\nYou act as this person in their own tab: status \"you\" is them (their peer id, name and role); the other users are everyone else.",
5775
6175
  "inputSchema": {
5776
6176
  "type": "object",
5777
6177
  "properties": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theprototype/agent",
3
- "version": "1.56.0",
3
+ "version": "1.59.0",
4
4
  "description": "Let an AI agent (Claude Code, Claude Desktop, any MCP host) join a theprototype.app session from its link and build the 3D scene with you.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/catalog.js CHANGED
@@ -217,17 +217,20 @@ export function buildCatalog(hostTools, opts = {}) {
217
217
  * {...}}` back into the fine tool before relaying): the tab, local agents and `serve` keep the fine names.
218
218
  * `actions` maps an action to the fine tool it runs. The action's fields go in an object named after the action,
219
219
  * which carries the fine tool's own schema and description, so nothing about a tool is lost by grouping it.
220
+ * mcp-shapes: a family may also have a BATCH — `batch: {key, tool}` — called as `{<key>: [...]}` with no action
221
+ * (create_shape {shapes: [{action, mesh: {...}}, ...]}); the families map carries it as action `<key>`.
220
222
  * Reserved, not built yet: edit_shape `update` (G6b update_mesh), assets search / place / prefab (85-world, 85b),
221
223
  * set_look environment / sky / light (85-scene, 85b), create_shape from_image (73's image-to-3D is generate_mesh,
222
224
  * which the connector leaves out).
223
- * @type {Readonly<Record<string, {title: string, summary: string, actions: Record<string, string>}>>}
225
+ * @type {Readonly<Record<string, {title: string, summary: string, actions: Record<string, string>, batch?: {key: string, tool: string}}>>}
224
226
  */
225
227
  export const CONNECTOR_FAMILIES = Object.freeze({
226
228
  create_shape: {
227
229
  title: 'Make a shape',
228
230
  summary:
229
231
  'Make shapes the basic objects cannot: a lathe (a vase, a bowl, a lamp from a profile turned around an axis), a tube along a path (a rail, a pipe, a cable), an extruded outline (a sign, a star, a wall with a hole), or a mesh from your own vertices (anything else).',
230
- actions: { lathe: 'create_lathe', tube: 'create_tube', extrude: 'extrude_shape', mesh: 'create_mesh' }
232
+ actions: { lathe: 'create_lathe', tube: 'create_tube', extrude: 'extrude_shape', mesh: 'create_mesh' },
233
+ batch: { key: 'shapes', tool: 'create_shapes' }
231
234
  },
232
235
  edit_shape: {
233
236
  title: 'Reshape or model objects',
@@ -294,8 +297,10 @@ export const CONNECTOR_STANDALONE = Object.freeze([
294
297
  /** fine tool → `family {action}` wording, for text the connector's model reads @returns {Map<string, string>} */
295
298
  export function familyNames() {
296
299
  const out = new Map();
297
- for (const [family, f] of Object.entries(CONNECTOR_FAMILIES))
300
+ for (const [family, f] of Object.entries(CONNECTOR_FAMILIES)) {
298
301
  for (const [action, tool] of Object.entries(f.actions)) out.set(tool, family + " {action: '" + action + "'}");
302
+ if (f.batch) out.set(f.batch.tool, family + ' {' + f.batch.key + ': […]}');
303
+ }
299
304
  return out;
300
305
  }
301
306
 
@@ -314,7 +319,7 @@ export function sayFamilyNames(text) {
314
319
  export function connectorView(plain, excluded) {
315
320
  const byName = new Map(plain.map((t) => [t.name, t]));
316
321
  const familyOf = new Map();
317
- for (const [family, f] of Object.entries(CONNECTOR_FAMILIES)) for (const tool of Object.values(f.actions)) familyOf.set(tool, family);
322
+ for (const [family, f] of Object.entries(CONNECTOR_FAMILIES)) for (const tool of [...Object.values(f.actions), ...(f.batch ? [f.batch.tool] : [])]) familyOf.set(tool, family);
318
323
  const stray = plain.map((t) => t.name).filter((n) => !CONNECTOR_STANDALONE.includes(n) && !familyOf.has(n) && !excluded.includes(n));
319
324
  if (stray.length)
320
325
  throw new Error('tools with no place in the connector (tools/agent/src/catalog.js CONNECTOR_FAMILIES / CONNECTOR_STANDALONE / CONNECTOR_BLOCKED_TOOLS): ' + stray.join(', '));
@@ -334,8 +339,16 @@ export function connectorView(plain, excluded) {
334
339
  for (const [family, f] of Object.entries(CONNECTOR_FAMILIES)) {
335
340
  const actions = Object.entries(f.actions).filter(([, tool]) => byName.has(tool));
336
341
  if (!actions.length) continue;
337
- families[family] = Object.fromEntries(actions);
338
- list.push(familyTool(family, f, actions.map(([action, tool]) => [action, /** @type {any} */ (byName.get(tool))])));
342
+ const batch = f.batch && byName.has(f.batch.tool) ? f.batch : null;
343
+ families[family] = { ...Object.fromEntries(actions), ...(batch ? { [batch.key]: batch.tool } : {}) };
344
+ list.push(
345
+ familyTool(
346
+ family,
347
+ f,
348
+ actions.map(([action, tool]) => [action, /** @type {any} */ (byName.get(tool))]),
349
+ batch ? { key: batch.key, tool: /** @type {any} */ (byName.get(batch.tool)) } : null
350
+ )
351
+ );
339
352
  }
340
353
  }
341
354
  const tools = withGuidance(list);
@@ -344,25 +357,33 @@ export function connectorView(plain, excluded) {
344
357
 
345
358
  /**
346
359
  * One family as one MCP tool. `{action, <action>: {...}}`; the per-action object has the fine tool's own schema.
360
+ * A batch (mcp-shapes) adds its list at the top level — `{<key>: [...]}`, no action — so `action` is then optional.
347
361
  * @param {string} family @param {{title: string, summary: string}} f @param {[string, any][]} actions
362
+ * @param {{key: string, tool: any} | null} [batch]
348
363
  */
349
- function familyTool(family, f, actions) {
364
+ function familyTool(family, f, actions, batch = null) {
350
365
  /** @type {Record<string, any>} */
351
366
  const properties = {
352
367
  action: { type: 'string', enum: actions.map(([a]) => a), description: 'What to do. Put its fields in the object named after the action.' }
353
368
  };
354
369
  for (const [action, t] of actions) properties[action] = { ...t.inputSchema, description: sayFamilyNames(t.description) };
355
370
  const example = actions[0][0];
356
- const description =
371
+ let description =
357
372
  f.summary + '\nCall it as {"action": "' + example + '", "' + example + '": {…its fields…}}; each action\'s fields and limits are in its object below.';
358
- const edits = actions.filter(([, t]) => !t.annotations.readOnlyHint);
373
+ if (batch) {
374
+ const list = batch.tool.inputSchema?.properties?.[batch.key];
375
+ properties[batch.key] = { ...(list ?? { type: 'array' }), description: sayFamilyNames(batch.tool.description) };
376
+ description += '\nMany at once: {"' + batch.key + '": [{"action": "' + example + '", "' + example + '": {…}}, …]} with no action — one call, one undo step.';
377
+ }
378
+ const all = batch ? [...actions, [batch.key, batch.tool]] : actions;
379
+ const edits = all.filter(([, t]) => !t.annotations.readOnlyHint);
359
380
  const annotations = {
360
381
  title: f.title,
361
382
  readOnlyHint: false,
362
383
  destructiveHint: edits.some(([, t]) => t.annotations.destructiveHint !== false),
363
- openWorldHint: actions.some(([, t]) => t.annotations.openWorldHint === true)
384
+ openWorldHint: all.some(([, t]) => t.annotations.openWorldHint === true)
364
385
  };
365
- return { name: family, title: f.title, description, inputSchema: { type: 'object', properties, required: ['action'] }, annotations };
386
+ return { name: family, title: f.title, description, inputSchema: { type: 'object', properties, ...(batch ? {} : { required: ['action'] }) }, annotations };
366
387
  }
367
388
 
368
389
  /**
@@ -374,6 +395,9 @@ function familyTool(family, f, actions) {
374
395
  export function resolveFamilyCall(families, name, args) {
375
396
  const actions = families?.[name];
376
397
  if (!actions) return null;
398
+ // mcp-shapes: a batch is called with its list and no action (create_shape {shapes: [...]})
399
+ const batchKey = typeof args?.action !== 'string' ? Object.keys(actions).find((k) => Array.isArray(args?.[k])) : undefined;
400
+ if (batchKey) return { tool: actions[batchKey], args: { [batchKey]: args[batchKey] } };
377
401
  const action = typeof args?.action === 'string' ? args.action : '';
378
402
  const tool = actions[action];
379
403
  if (!tool) return { error: name + ' needs an action: one of ' + Object.keys(actions).join(', ') + '.' };
package/src/mcpTools.js CHANGED
@@ -77,7 +77,7 @@ export function bridgeTools(engine = 'browser') {
77
77
  {
78
78
  name: 'status',
79
79
  description:
80
- 'Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing.',
80
+ 'Where the agent is: connection state, whether the host has let it in, its role (viewer edits stay local), the app version, and why any tool is missing. sceneBudget says how heavy the scene is: objects, triangles (per frame drawn; the scene\'s own count while the view is idle, then no draw calls), draw calls, textures, lights you placed, frame time p95, tier green / amber / red on the desktop or vr profile, and over = each budget past green (build lighter, or stop adding, while it is not green).',
81
81
  inputSchema: { type: 'object', properties: {} }
82
82
  }
83
83
  ];