sceneview-mcp 4.0.15 → 4.1.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/README.md +246 -62
- package/dist/analyze-project.js +4 -2
- package/dist/artifact.js +38 -13
- package/dist/debug-issue.js +101 -19
- package/dist/discover.js +106 -0
- package/dist/extra-guides.js +3 -3
- package/dist/generate-scene.js +380 -61
- package/dist/generated/llms-txt.js +1 -1
- package/dist/generated/symbols.js +1048 -28
- package/dist/generated/version.js +15 -2
- package/dist/guides.js +10 -6
- package/dist/http.js +178 -0
- package/dist/index.js +34 -139
- package/dist/issues.js +1 -1
- package/dist/migrate-code.js +5 -3
- package/dist/platform-setup.js +150 -57
- package/dist/samples.js +31 -31
- package/dist/search-models.js +1 -1
- package/dist/server.js +197 -0
- package/dist/surfaces.js +32 -0
- package/dist/telemetry.js +14 -8
- package/dist/tools/definitions.js +176 -14
- package/dist/tools/handler.js +207 -66
- package/dist/tools/index.js +4 -4
- package/dist/tools/types.js +0 -4
- package/dist/validator.js +262 -161
- package/dist/widgets.js +915 -0
- package/package.json +16 -12
- package/dist/proxy.js +0 -176
- package/dist/tiers.js +0 -138
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* keeps the stdio server's `ListToolsRequestSchema` response identical to
|
|
8
8
|
* what it was before the refactor.
|
|
9
9
|
*/
|
|
10
|
-
import { SAMPLE_IDS, SAMPLES } from "../samples.js";
|
|
11
|
-
import { PLATFORM_IDS } from "../platform-setup.js";
|
|
12
10
|
import { DEBUG_CATEGORIES } from "../debug-issue.js";
|
|
11
|
+
import { PLATFORM_IDS } from "../platform-setup.js";
|
|
12
|
+
import { SAMPLE_IDS, SAMPLES } from "../samples.js";
|
|
13
|
+
import { WIDGET_3D_VIEWER_URI } from "../widgets.js";
|
|
13
14
|
export const TOOL_DEFINITIONS = [
|
|
14
15
|
{
|
|
15
16
|
name: "get_sample",
|
|
@@ -29,6 +30,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
29
30
|
readOnlyHint: true,
|
|
30
31
|
openWorldHint: false,
|
|
31
32
|
destructiveHint: false,
|
|
33
|
+
title: "Get code sample",
|
|
32
34
|
},
|
|
33
35
|
},
|
|
34
36
|
{
|
|
@@ -39,7 +41,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
39
41
|
properties: {
|
|
40
42
|
tag: {
|
|
41
43
|
type: "string",
|
|
42
|
-
description:
|
|
44
|
+
description: 'Optional tag to filter by (e.g. "ar", "3d", "ios", "swift", "anchor", "geometry", "animation", "video", "lighting"). Omit to list all samples.',
|
|
43
45
|
},
|
|
44
46
|
},
|
|
45
47
|
required: [],
|
|
@@ -48,6 +50,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
48
50
|
readOnlyHint: true,
|
|
49
51
|
openWorldHint: false,
|
|
50
52
|
destructiveHint: false,
|
|
53
|
+
title: "List code samples",
|
|
51
54
|
},
|
|
52
55
|
},
|
|
53
56
|
{
|
|
@@ -68,6 +71,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
68
71
|
readOnlyHint: true,
|
|
69
72
|
openWorldHint: false,
|
|
70
73
|
destructiveHint: false,
|
|
74
|
+
title: "Get Android setup",
|
|
71
75
|
},
|
|
72
76
|
},
|
|
73
77
|
{
|
|
@@ -87,6 +91,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
87
91
|
readOnlyHint: true,
|
|
88
92
|
openWorldHint: false,
|
|
89
93
|
destructiveHint: false,
|
|
94
|
+
title: "Validate SceneView code",
|
|
90
95
|
},
|
|
91
96
|
},
|
|
92
97
|
{
|
|
@@ -101,6 +106,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
101
106
|
readOnlyHint: true,
|
|
102
107
|
openWorldHint: false,
|
|
103
108
|
destructiveHint: false,
|
|
109
|
+
title: "Get migration guide",
|
|
104
110
|
},
|
|
105
111
|
},
|
|
106
112
|
{
|
|
@@ -120,6 +126,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
120
126
|
readOnlyHint: true,
|
|
121
127
|
openWorldHint: false,
|
|
122
128
|
destructiveHint: false,
|
|
129
|
+
title: "Get node reference",
|
|
123
130
|
},
|
|
124
131
|
},
|
|
125
132
|
{
|
|
@@ -134,6 +141,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
134
141
|
readOnlyHint: true,
|
|
135
142
|
openWorldHint: false,
|
|
136
143
|
destructiveHint: false,
|
|
144
|
+
title: "Get platform roadmap",
|
|
137
145
|
},
|
|
138
146
|
},
|
|
139
147
|
{
|
|
@@ -154,6 +162,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
154
162
|
readOnlyHint: true,
|
|
155
163
|
openWorldHint: false,
|
|
156
164
|
destructiveHint: false,
|
|
165
|
+
title: "Get best practices",
|
|
157
166
|
},
|
|
158
167
|
},
|
|
159
168
|
{
|
|
@@ -168,6 +177,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
168
177
|
readOnlyHint: true,
|
|
169
178
|
openWorldHint: false,
|
|
170
179
|
destructiveHint: false,
|
|
180
|
+
title: "Get AR setup",
|
|
171
181
|
},
|
|
172
182
|
},
|
|
173
183
|
{
|
|
@@ -182,6 +192,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
182
192
|
readOnlyHint: true,
|
|
183
193
|
openWorldHint: false,
|
|
184
194
|
destructiveHint: false,
|
|
195
|
+
title: "Get troubleshooting guide",
|
|
185
196
|
},
|
|
186
197
|
},
|
|
187
198
|
{
|
|
@@ -202,6 +213,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
202
213
|
readOnlyHint: true,
|
|
203
214
|
openWorldHint: false,
|
|
204
215
|
destructiveHint: false,
|
|
216
|
+
title: "Get iOS setup",
|
|
205
217
|
},
|
|
206
218
|
},
|
|
207
219
|
{
|
|
@@ -215,6 +227,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
215
227
|
readOnlyHint: true,
|
|
216
228
|
openWorldHint: false,
|
|
217
229
|
destructiveHint: false,
|
|
230
|
+
title: "Get web setup",
|
|
218
231
|
},
|
|
219
232
|
},
|
|
220
233
|
{
|
|
@@ -246,10 +259,22 @@ export const TOOL_DEFINITIONS = [
|
|
|
246
259
|
},
|
|
247
260
|
required: [],
|
|
248
261
|
},
|
|
262
|
+
outputSchema: {
|
|
263
|
+
type: "object",
|
|
264
|
+
properties: {
|
|
265
|
+
previewUrl: { type: "string" },
|
|
266
|
+
modelUrl: { type: "string" },
|
|
267
|
+
hasCode: { type: "boolean" },
|
|
268
|
+
title: { type: "string" },
|
|
269
|
+
},
|
|
270
|
+
required: ["previewUrl", "modelUrl", "hasCode", "title"],
|
|
271
|
+
additionalProperties: false,
|
|
272
|
+
},
|
|
249
273
|
annotations: {
|
|
250
274
|
readOnlyHint: true,
|
|
251
275
|
openWorldHint: false,
|
|
252
276
|
destructiveHint: false,
|
|
277
|
+
title: "Render 3D preview",
|
|
253
278
|
},
|
|
254
279
|
},
|
|
255
280
|
{
|
|
@@ -278,7 +303,10 @@ export const TOOL_DEFINITIONS = [
|
|
|
278
303
|
properties: {
|
|
279
304
|
label: { type: "string", description: "Data point label (e.g. 'Q1 2025')" },
|
|
280
305
|
value: { type: "number", description: "Numeric value" },
|
|
281
|
-
color: {
|
|
306
|
+
color: {
|
|
307
|
+
type: "string",
|
|
308
|
+
description: "Optional hex color (e.g. '#4285F4'). Auto-assigned if omitted.",
|
|
309
|
+
},
|
|
282
310
|
},
|
|
283
311
|
required: ["label", "value"],
|
|
284
312
|
},
|
|
@@ -289,8 +317,14 @@ export const TOOL_DEFINITIONS = [
|
|
|
289
317
|
properties: {
|
|
290
318
|
autoRotate: { type: "boolean", description: "Auto-rotate the model (default: true)" },
|
|
291
319
|
ar: { type: "boolean", description: "Enable AR on mobile devices (default: true)" },
|
|
292
|
-
backgroundColor: {
|
|
293
|
-
|
|
320
|
+
backgroundColor: {
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "Background color as hex (default: '#1a1a2e')",
|
|
323
|
+
},
|
|
324
|
+
cameraOrbit: {
|
|
325
|
+
type: "string",
|
|
326
|
+
description: "Camera orbit string (default: '0deg 75deg 105%')",
|
|
327
|
+
},
|
|
294
328
|
},
|
|
295
329
|
description: "Visual options for the 3D artifact.",
|
|
296
330
|
},
|
|
@@ -349,10 +383,24 @@ export const TOOL_DEFINITIONS = [
|
|
|
349
383
|
},
|
|
350
384
|
required: ["type"],
|
|
351
385
|
},
|
|
386
|
+
outputSchema: {
|
|
387
|
+
type: "object",
|
|
388
|
+
properties: {
|
|
389
|
+
html: { type: "string" },
|
|
390
|
+
title: { type: "string" },
|
|
391
|
+
type: {
|
|
392
|
+
type: "string",
|
|
393
|
+
enum: ["model-viewer", "chart-3d", "scene", "product-360", "geometry"],
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
required: ["html", "title", "type"],
|
|
397
|
+
additionalProperties: false,
|
|
398
|
+
},
|
|
352
399
|
annotations: {
|
|
353
400
|
readOnlyHint: true,
|
|
354
401
|
openWorldHint: false,
|
|
355
402
|
destructiveHint: false,
|
|
403
|
+
title: "Create 3D artifact",
|
|
356
404
|
},
|
|
357
405
|
},
|
|
358
406
|
{
|
|
@@ -378,6 +426,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
378
426
|
readOnlyHint: true,
|
|
379
427
|
openWorldHint: false,
|
|
380
428
|
destructiveHint: false,
|
|
429
|
+
title: "Get platform setup",
|
|
381
430
|
},
|
|
382
431
|
},
|
|
383
432
|
{
|
|
@@ -397,6 +446,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
397
446
|
readOnlyHint: true,
|
|
398
447
|
openWorldHint: false,
|
|
399
448
|
destructiveHint: false,
|
|
449
|
+
title: "Migrate code",
|
|
400
450
|
},
|
|
401
451
|
},
|
|
402
452
|
{
|
|
@@ -421,6 +471,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
421
471
|
readOnlyHint: true,
|
|
422
472
|
openWorldHint: false,
|
|
423
473
|
destructiveHint: false,
|
|
474
|
+
title: "Debug a SceneView issue",
|
|
424
475
|
},
|
|
425
476
|
},
|
|
426
477
|
{
|
|
@@ -440,6 +491,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
440
491
|
readOnlyHint: true,
|
|
441
492
|
openWorldHint: false,
|
|
442
493
|
destructiveHint: false,
|
|
494
|
+
title: "Generate a scene",
|
|
443
495
|
},
|
|
444
496
|
},
|
|
445
497
|
{
|
|
@@ -450,10 +502,43 @@ export const TOOL_DEFINITIONS = [
|
|
|
450
502
|
properties: {},
|
|
451
503
|
required: [],
|
|
452
504
|
},
|
|
505
|
+
outputSchema: {
|
|
506
|
+
type: "object",
|
|
507
|
+
properties: {
|
|
508
|
+
platforms: {
|
|
509
|
+
type: "array",
|
|
510
|
+
items: {
|
|
511
|
+
type: "object",
|
|
512
|
+
properties: {
|
|
513
|
+
platform: { type: "string" },
|
|
514
|
+
renderer: { type: "string" },
|
|
515
|
+
framework: { type: "string" },
|
|
516
|
+
status: { type: "string" },
|
|
517
|
+
version: { type: "string" },
|
|
518
|
+
dependency: { type: "string" },
|
|
519
|
+
features: { type: "array", items: { type: "string" } },
|
|
520
|
+
},
|
|
521
|
+
required: [
|
|
522
|
+
"platform",
|
|
523
|
+
"renderer",
|
|
524
|
+
"framework",
|
|
525
|
+
"status",
|
|
526
|
+
"version",
|
|
527
|
+
"dependency",
|
|
528
|
+
"features",
|
|
529
|
+
],
|
|
530
|
+
additionalProperties: false,
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
required: ["platforms"],
|
|
535
|
+
additionalProperties: false,
|
|
536
|
+
},
|
|
453
537
|
annotations: {
|
|
454
538
|
readOnlyHint: true,
|
|
455
539
|
openWorldHint: false,
|
|
456
540
|
destructiveHint: false,
|
|
541
|
+
title: "List supported platforms",
|
|
457
542
|
},
|
|
458
543
|
},
|
|
459
544
|
{
|
|
@@ -468,6 +553,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
468
553
|
readOnlyHint: true,
|
|
469
554
|
openWorldHint: false,
|
|
470
555
|
destructiveHint: false,
|
|
556
|
+
title: "Get animation guide",
|
|
471
557
|
},
|
|
472
558
|
},
|
|
473
559
|
{
|
|
@@ -482,6 +568,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
482
568
|
readOnlyHint: true,
|
|
483
569
|
openWorldHint: false,
|
|
484
570
|
destructiveHint: false,
|
|
571
|
+
title: "Get gesture guide",
|
|
485
572
|
},
|
|
486
573
|
},
|
|
487
574
|
{
|
|
@@ -496,6 +583,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
496
583
|
readOnlyHint: true,
|
|
497
584
|
openWorldHint: false,
|
|
498
585
|
destructiveHint: false,
|
|
586
|
+
title: "Get performance tips",
|
|
499
587
|
},
|
|
500
588
|
},
|
|
501
589
|
{
|
|
@@ -510,6 +598,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
510
598
|
readOnlyHint: true,
|
|
511
599
|
openWorldHint: false,
|
|
512
600
|
destructiveHint: false,
|
|
601
|
+
title: "Get material guide",
|
|
513
602
|
},
|
|
514
603
|
},
|
|
515
604
|
{
|
|
@@ -524,6 +613,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
524
613
|
readOnlyHint: true,
|
|
525
614
|
openWorldHint: false,
|
|
526
615
|
destructiveHint: false,
|
|
616
|
+
title: "Get collision guide",
|
|
527
617
|
},
|
|
528
618
|
},
|
|
529
619
|
{
|
|
@@ -538,6 +628,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
538
628
|
readOnlyHint: true,
|
|
539
629
|
openWorldHint: false,
|
|
540
630
|
destructiveHint: false,
|
|
631
|
+
title: "Get model optimization guide",
|
|
541
632
|
},
|
|
542
633
|
},
|
|
543
634
|
{
|
|
@@ -552,21 +643,22 @@ export const TOOL_DEFINITIONS = [
|
|
|
552
643
|
readOnlyHint: true,
|
|
553
644
|
openWorldHint: false,
|
|
554
645
|
destructiveHint: false,
|
|
646
|
+
title: "Get web rendering guide",
|
|
555
647
|
},
|
|
556
648
|
},
|
|
557
649
|
{
|
|
558
650
|
name: "search_models",
|
|
559
|
-
description:
|
|
651
|
+
description: 'Searches Sketchfab for free 3D models matching a natural-language query and returns a shortlist with names, authors, licenses, thumbnails, triangle counts, and viewer/embed URLs. Use this BEFORE generating SceneView code when the user asks for a specific asset ("a red sports car", "a low-poly tree", "a sci-fi robot") — pick the best result, then load it with `rememberModelInstance(modelLoader, "models/your-file.glb")` or embed its viewer URL. Requires a free `SKETCHFAB_API_KEY` environment variable (BYOK — nothing is charged by SceneView). If the key is missing, the tool returns instructions for getting one at sketchfab.com/register.',
|
|
560
652
|
inputSchema: {
|
|
561
653
|
type: "object",
|
|
562
654
|
properties: {
|
|
563
655
|
query: {
|
|
564
656
|
type: "string",
|
|
565
|
-
description:
|
|
657
|
+
description: 'Free-text search query, e.g. "red sports car", "low-poly pine tree", "sci-fi robot".',
|
|
566
658
|
},
|
|
567
659
|
category: {
|
|
568
660
|
type: "string",
|
|
569
|
-
description:
|
|
661
|
+
description: 'Optional Sketchfab category slug to narrow results (e.g. "cars-vehicles", "animals-pets", "architecture", "furniture-home", "weapons-military").',
|
|
570
662
|
},
|
|
571
663
|
downloadable: {
|
|
572
664
|
type: "boolean",
|
|
@@ -583,17 +675,18 @@ export const TOOL_DEFINITIONS = [
|
|
|
583
675
|
readOnlyHint: true,
|
|
584
676
|
openWorldHint: true,
|
|
585
677
|
destructiveHint: false,
|
|
678
|
+
title: "Search 3D models",
|
|
586
679
|
},
|
|
587
680
|
},
|
|
588
681
|
{
|
|
589
682
|
name: "generate_3d_model",
|
|
590
|
-
description:
|
|
683
|
+
description: 'Generates a brand-new 3D model (GLB) from a text prompt OR a source image using the Tripo AI API — use this when `search_models` finds no suitable existing asset and the user needs a custom one ("a low-poly cactus in a striped pot"). Returns a direct GLB download URL (expires ~5 minutes — download it immediately and self-host it) plus license/attribution metadata, ready for `rememberModelInstance(modelLoader, ...)` and AR placement. Quality tiers: "fast" (default, Tripo P1 low-poly — AR-ready, ~25-30 s) or "hd" (Tripo H3.1 quad topology with detailed geometry/textures — up to ~100 s, pricier). Requires a `TRIPO_API_KEY` environment variable (BYOK — generations are billed to the USER\'S Tripo account, roughly $0.10-0.25 per fast generation and ~$0.41 per hd generation as of July 2026; nothing is charged by SceneView). If the key is missing, the tool returns setup instructions for platform.tripo3d.ai/api-keys.',
|
|
591
684
|
inputSchema: {
|
|
592
685
|
type: "object",
|
|
593
686
|
properties: {
|
|
594
687
|
prompt: {
|
|
595
688
|
type: "string",
|
|
596
|
-
description:
|
|
689
|
+
description: 'Text description of the model to generate (text→3D), e.g. "a low-poly cactus in a striped pot". Max 1024 characters. Provide exactly one of `prompt` or `imageUrl`.',
|
|
597
690
|
},
|
|
598
691
|
imageUrl: {
|
|
599
692
|
type: "string",
|
|
@@ -611,6 +704,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
611
704
|
readOnlyHint: false,
|
|
612
705
|
openWorldHint: true,
|
|
613
706
|
destructiveHint: false,
|
|
707
|
+
title: "Generate a 3D model",
|
|
614
708
|
},
|
|
615
709
|
},
|
|
616
710
|
{
|
|
@@ -630,17 +724,18 @@ export const TOOL_DEFINITIONS = [
|
|
|
630
724
|
readOnlyHint: true,
|
|
631
725
|
openWorldHint: true,
|
|
632
726
|
destructiveHint: false,
|
|
727
|
+
title: "Analyze a project",
|
|
633
728
|
},
|
|
634
729
|
},
|
|
635
730
|
{
|
|
636
731
|
name: "search_android_docs",
|
|
637
|
-
description:
|
|
732
|
+
description: 'Searches Google\'s stock Android documentation knowledge base (~4 800 entries: Jetpack Compose, Camera2, ARCore SDK, Kotlin APIs, platform guides) and returns matching entries with their `kb://...` URIs. Use this to cross-reference stock Android APIs with SceneView code — e.g. "how does LazyColumn paging work", "Camera2 capture session", "ARCore Config options". Then call `fetch_android_doc` with a returned URI to read the full entry. Requires Google\'s `android` CLI on the MCP host\'s PATH (an optional runtime dependency — sceneview-mcp works without it); if the CLI is absent the tool returns clear install instructions instead of crashing.',
|
|
638
733
|
inputSchema: {
|
|
639
734
|
type: "object",
|
|
640
735
|
properties: {
|
|
641
736
|
query: {
|
|
642
737
|
type: "string",
|
|
643
|
-
description:
|
|
738
|
+
description: 'Free-text search query, e.g. "LazyColumn paging", "Camera2 capture session", "ARCore anchors".',
|
|
644
739
|
},
|
|
645
740
|
},
|
|
646
741
|
required: ["query"],
|
|
@@ -649,6 +744,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
649
744
|
readOnlyHint: true,
|
|
650
745
|
openWorldHint: true,
|
|
651
746
|
destructiveHint: false,
|
|
747
|
+
title: "Search Android docs",
|
|
652
748
|
},
|
|
653
749
|
},
|
|
654
750
|
{
|
|
@@ -659,7 +755,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
659
755
|
properties: {
|
|
660
756
|
uri: {
|
|
661
757
|
type: "string",
|
|
662
|
-
description:
|
|
758
|
+
description: 'The knowledge-base URI to fetch, e.g. "kb://compose/lists/lazy-column". A bare path with no scheme is tolerated and normalised to kb://.',
|
|
663
759
|
},
|
|
664
760
|
},
|
|
665
761
|
required: ["uri"],
|
|
@@ -668,6 +764,72 @@ export const TOOL_DEFINITIONS = [
|
|
|
668
764
|
readOnlyHint: true,
|
|
669
765
|
openWorldHint: true,
|
|
670
766
|
destructiveHint: false,
|
|
767
|
+
title: "Fetch an Android doc",
|
|
768
|
+
},
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
name: "view_3d_model",
|
|
772
|
+
description: "Render an interactive 3D model viewer inline in the conversation. Pass a public GLB / GLTF / 3MF URL and the assistant will display it in a SceneView-branded widget with orbit controls, auto-rotate, and AR mode (where supported). Use this when the user asks to PREVIEW a 3D model, asks 'what does X look like in 3D?', after `search_models` to render the chosen result, or to show a `.3mf` you just produced for 3D printing — the widget converts 3MF to glTF in the browser, so a printable model is previewable without any download.",
|
|
773
|
+
inputSchema: {
|
|
774
|
+
type: "object",
|
|
775
|
+
properties: {
|
|
776
|
+
modelUrl: {
|
|
777
|
+
type: "string",
|
|
778
|
+
description: "Public HTTPS URL to a .glb, .gltf or .3mf 3D model file (`model/gltf-binary`, `model/gltf+json`, `model/3mf`). Must be CORS-enabled. Works with assets from sceneview.github.io, model-viewer-textured CDN, Sketchfab download URLs, or any CORS-friendly host. A 3MF — what a 3D-print flow or a slicer produces — is converted to glTF inside the widget, in real-world units.",
|
|
779
|
+
},
|
|
780
|
+
title: {
|
|
781
|
+
type: "string",
|
|
782
|
+
description: "Optional title shown above the viewer (e.g. the model name).",
|
|
783
|
+
},
|
|
784
|
+
autoRotate: {
|
|
785
|
+
type: "boolean",
|
|
786
|
+
description: "Whether the model should slowly auto-rotate when idle. Default: true.",
|
|
787
|
+
},
|
|
788
|
+
ar: {
|
|
789
|
+
type: "boolean",
|
|
790
|
+
description: "Whether to show the 'Open in AR on your phone' action (a link that opens the model in the AR Model Viewer app, plus a QR code on desktop). Only shown for https model URLs. Default: true.",
|
|
791
|
+
},
|
|
792
|
+
alt: {
|
|
793
|
+
type: "string",
|
|
794
|
+
description: "Accessibility text describing what the model represents.",
|
|
795
|
+
},
|
|
796
|
+
posterUrl: {
|
|
797
|
+
type: "string",
|
|
798
|
+
description: "Optional preview image URL shown while the model is loading.",
|
|
799
|
+
},
|
|
800
|
+
},
|
|
801
|
+
required: ["modelUrl"],
|
|
802
|
+
},
|
|
803
|
+
outputSchema: {
|
|
804
|
+
type: "object",
|
|
805
|
+
properties: {
|
|
806
|
+
modelUrl: { type: "string" },
|
|
807
|
+
title: { type: "string" },
|
|
808
|
+
autoRotate: { type: "boolean" },
|
|
809
|
+
ar: { type: "boolean" },
|
|
810
|
+
alt: { type: "string" },
|
|
811
|
+
posterUrl: { type: "string" },
|
|
812
|
+
},
|
|
813
|
+
required: ["modelUrl", "title", "autoRotate", "ar", "alt"],
|
|
814
|
+
additionalProperties: false,
|
|
815
|
+
},
|
|
816
|
+
annotations: {
|
|
817
|
+
readOnlyHint: true,
|
|
818
|
+
// The model URL is fetched by the user's browser inside the widget
|
|
819
|
+
// iframe, not by this server. Still, the widget pulls a third-party
|
|
820
|
+
// asset, so openWorldHint is true to be honest about it.
|
|
821
|
+
openWorldHint: true,
|
|
822
|
+
destructiveHint: false,
|
|
823
|
+
title: "View 3D model",
|
|
824
|
+
},
|
|
825
|
+
// Widget binding on the DECLARATION: hosts decide from `tools/list` which
|
|
826
|
+
// resource renders this tool's result. `ui.resourceUri` is the MCP Apps
|
|
827
|
+
// key; the `openai/*` keys are the ChatGPT Apps SDK spellings.
|
|
828
|
+
_meta: {
|
|
829
|
+
ui: { resourceUri: WIDGET_3D_VIEWER_URI },
|
|
830
|
+
"openai/outputTemplate": WIDGET_3D_VIEWER_URI,
|
|
831
|
+
"openai/toolInvocation/invoking": "Rendering 3D model with SceneView",
|
|
832
|
+
"openai/toolInvocation/invoked": "3D model rendered",
|
|
671
833
|
},
|
|
672
834
|
},
|
|
673
835
|
];
|