sceneview-mcp 3.6.2 → 3.6.4
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 +39 -0
- package/dist/analyze-project.js +500 -0
- package/dist/auth.js +84 -0
- package/dist/billing.js +137 -0
- package/dist/convert-platform.js +302 -0
- package/dist/debug-issue.js +2 -2
- package/dist/explain-api.js +245 -0
- package/dist/extra-guides.js +1 -1
- package/dist/generate-animation.js +576 -0
- package/dist/generate-environment.js +483 -0
- package/dist/generate-gesture.js +532 -0
- package/dist/generate-physics.js +570 -0
- package/dist/generate-scene.js +4 -4
- package/dist/generated/llms-txt.js +6 -0
- package/dist/guides.js +8 -8
- package/dist/index.js +54 -1111
- package/dist/migration.js +2 -2
- package/dist/optimize-scene.js +173 -0
- package/dist/platform-setup.js +11 -11
- package/dist/samples.js +64 -64
- package/dist/search-models.js +214 -0
- package/dist/telemetry.js +120 -0
- package/dist/tiers.js +100 -0
- package/dist/tools/definitions.js +467 -0
- package/dist/tools/handler.js +791 -0
- package/dist/tools/index.js +18 -0
- package/dist/tools/types.js +8 -0
- package/dist/validator.js +1 -1
- package/llms.txt +24 -1
- package/package.json +7 -18
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool definitions (schemas + descriptions) for the SceneView MCP server.
|
|
3
|
+
*
|
|
4
|
+
* This file intentionally contains NO handler code — only the static MCP
|
|
5
|
+
* tool metadata. The runtime handlers live in `handler.ts`. Splitting them
|
|
6
|
+
* lets the gateway list tools without pulling the (larger) handler tree and
|
|
7
|
+
* keeps the stdio server's `ListToolsRequestSchema` response identical to
|
|
8
|
+
* what it was before the refactor.
|
|
9
|
+
*/
|
|
10
|
+
import { SAMPLE_IDS, SAMPLES } from "../samples.js";
|
|
11
|
+
import { PLATFORM_IDS } from "../platform-setup.js";
|
|
12
|
+
import { DEBUG_CATEGORIES } from "../debug-issue.js";
|
|
13
|
+
export const TOOL_DEFINITIONS = [
|
|
14
|
+
{
|
|
15
|
+
name: "get_sample",
|
|
16
|
+
description: "Returns a complete, compilable Kotlin sample for a given SceneView scenario. Use this to get a working starting point before customising. Call `list_samples` first if you are unsure which scenario fits.",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: "object",
|
|
19
|
+
properties: {
|
|
20
|
+
scenario: {
|
|
21
|
+
type: "string",
|
|
22
|
+
enum: SAMPLE_IDS,
|
|
23
|
+
description: `The scenario to fetch:\n${SAMPLE_IDS.map((id) => `- "${id}": ${SAMPLES[id].description}`).join("\n")}`,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
required: ["scenario"],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "list_samples",
|
|
31
|
+
description: "Lists all available SceneView code samples with their IDs, descriptions, and tags. Use this to find the right sample before calling `get_sample`, or to show the user what SceneView can do.",
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
tag: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Optional tag to filter by (e.g. \"ar\", \"3d\", \"ios\", \"swift\", \"anchor\", \"geometry\", \"animation\", \"video\", \"lighting\"). Omit to list all samples.",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: [],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "get_setup",
|
|
45
|
+
description: "Returns the Gradle dependency and AndroidManifest snippet required to use SceneView in an Android project.",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
type: {
|
|
50
|
+
type: "string",
|
|
51
|
+
enum: ["3d", "ar"],
|
|
52
|
+
description: '"3d" for 3D-only scenes. "ar" for augmented reality (includes 3D).',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ["type"],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "validate_code",
|
|
60
|
+
description: "Checks a Kotlin or Swift SceneView snippet for common mistakes. For Kotlin: threading violations, wrong destroy order, missing null-checks, LightNode trailing-lambda bug, deprecated 2.x APIs. For Swift: missing @MainActor, async/await patterns, missing imports, RealityKit mistakes. Language is auto-detected. Always call this before presenting generated SceneView code to the user.",
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
code: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "The Kotlin or Swift source code to validate (composable function, SwiftUI view, class, or file). Language is auto-detected.",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
required: ["code"],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "get_migration_guide",
|
|
74
|
+
description: "Returns the full SceneView 2.x → 3.0 migration guide. Use this when a user reports code that worked in 2.x but breaks in 3.0, or when helping someone upgrade.",
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {},
|
|
78
|
+
required: [],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "get_node_reference",
|
|
83
|
+
description: "Returns the full API reference for a specific SceneView node type or composable — parameters, types, and a usage example — parsed directly from the official llms.txt. Use this when you need the exact signature or options for a node (e.g. ModelNode, LightNode, ARScene). If the requested type is not found, the response lists all available types.",
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: "object",
|
|
86
|
+
properties: {
|
|
87
|
+
nodeType: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: 'The node type or composable name to look up, e.g. "ModelNode", "LightNode", "ARScene", "AnchorNode". Case-insensitive.',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
required: ["nodeType"],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "get_platform_roadmap",
|
|
97
|
+
description: "Returns the SceneView multi-platform roadmap — current Android support status, planned iOS/KMP/web targets, and timeline. Use this when the user asks about cross-platform support, iOS, Kotlin Multiplatform, or future plans.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {},
|
|
101
|
+
required: [],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "get_best_practices",
|
|
106
|
+
description: "Returns SceneView performance and architecture best practices — memory management, model optimization, threading rules, Compose integration patterns, and common anti-patterns. Use this when the user asks about performance, optimization, best practices, or architecture.",
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
category: {
|
|
111
|
+
type: "string",
|
|
112
|
+
enum: ["all", "performance", "architecture", "memory", "threading"],
|
|
113
|
+
description: 'Category to filter by. "all" returns everything. Defaults to "all" if omitted.',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: [],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "get_ar_setup",
|
|
121
|
+
description: "Returns detailed AR setup instructions — AndroidManifest permissions and features, Gradle dependencies, ARCore session configuration options (depth, light estimation, instant placement, plane detection, image tracking, cloud anchors), and a complete working AR starter template. More detailed than `get_setup` for AR-specific configuration.",
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {},
|
|
125
|
+
required: [],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "get_troubleshooting",
|
|
130
|
+
description: "Returns the SceneView troubleshooting guide — common crashes (SIGABRT, model not showing), build failures, AR issues (drift, overexposure, image detection), and performance problems. Use this when a user reports something not working, a crash, or unexpected behavior.",
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: "object",
|
|
133
|
+
properties: {},
|
|
134
|
+
required: [],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "get_ios_setup",
|
|
139
|
+
description: "Returns the complete iOS setup guide for SceneViewSwift — SPM dependency, Package.swift example, minimum platform versions, Info.plist entries for AR (camera permission), and basic SwiftUI integration code. Use this when a user wants to set up SceneView for iOS, macOS, or visionOS.",
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
type: {
|
|
144
|
+
type: "string",
|
|
145
|
+
enum: ["3d", "ar"],
|
|
146
|
+
description: '"3d" for 3D-only scenes. "ar" for augmented reality (requires iOS, not macOS/visionOS via this path).',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
required: ["type"],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "get_web_setup",
|
|
154
|
+
description: "Returns the complete Web setup guide for SceneView Web — npm install, Kotlin/JS Gradle config, HTML canvas setup, and basic Filament.js integration code. SceneView Web uses the same Filament rendering engine as Android, compiled to WebAssembly. Use this when a user wants to set up SceneView for browsers.",
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: "object",
|
|
157
|
+
properties: {},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "render_3d_preview",
|
|
162
|
+
description: "Generates an interactive 3D preview link. Accepts a model URL, a SceneView code snippet, or both. Returns a URL to sceneview.github.io/preview that renders the model in the browser with orbit controls, AR support, and sharing. For model URLs: embeds a model-viewer link directly. For code snippets: shows the 3D preview with the code in a companion panel. Use this when you want to show a 3D model to the user — paste the link in your response and they can click to see it live.",
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
properties: {
|
|
166
|
+
modelUrl: {
|
|
167
|
+
type: "string",
|
|
168
|
+
description: "Public URL to a .glb or .gltf model file. Must be HTTPS and CORS-enabled. If omitted, a default model is used.",
|
|
169
|
+
},
|
|
170
|
+
codeSnippet: {
|
|
171
|
+
type: "string",
|
|
172
|
+
description: "SceneView code snippet (Kotlin or Swift) to display alongside the 3D preview in a companion panel. Useful when showing generated code together with a live preview.",
|
|
173
|
+
},
|
|
174
|
+
autoRotate: {
|
|
175
|
+
type: "boolean",
|
|
176
|
+
description: "Auto-rotate the model (default: true).",
|
|
177
|
+
},
|
|
178
|
+
ar: {
|
|
179
|
+
type: "boolean",
|
|
180
|
+
description: "Enable AR mode on supported devices (default: true).",
|
|
181
|
+
},
|
|
182
|
+
title: {
|
|
183
|
+
type: "string",
|
|
184
|
+
description: "Custom title shown above the preview.",
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
required: [],
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "create_3d_artifact",
|
|
192
|
+
description: 'Generates a complete, self-contained HTML page with interactive 3D content that Claude can render as an artifact. Returns valid HTML using model-viewer (Google\'s web component for 3D). Use this when the user asks to "show", "preview", "visualize" 3D models, create 3D charts/dashboards, or view products in 360°. The HTML works standalone in any browser, supports AR on mobile, and includes orbit controls. Types: "model-viewer" for 3D model viewing, "chart-3d" for 3D data visualization (bar charts with perspective), "scene" for rich 3D scenes with lighting, "product-360" for product turntables with hotspot annotations.',
|
|
193
|
+
inputSchema: {
|
|
194
|
+
type: "object",
|
|
195
|
+
properties: {
|
|
196
|
+
type: {
|
|
197
|
+
type: "string",
|
|
198
|
+
enum: ["model-viewer", "chart-3d", "scene", "product-360", "geometry"],
|
|
199
|
+
description: '"model-viewer": interactive 3D model viewer with orbit + AR. "chart-3d": 3D bar chart for data visualization. "scene": rich 3D scene with lighting. "product-360": product turntable with hotspot annotations. "geometry": procedural 3D shapes (cubes, spheres, cylinders, planes, lines) — Claude can DRAW in 3D! Use this when the user asks to draw, build, or visualize 3D shapes.',
|
|
200
|
+
},
|
|
201
|
+
modelUrl: {
|
|
202
|
+
type: "string",
|
|
203
|
+
description: "Public HTTPS URL to a .glb or .gltf model. If omitted, a default model is used. Not needed for chart-3d type.",
|
|
204
|
+
},
|
|
205
|
+
title: {
|
|
206
|
+
type: "string",
|
|
207
|
+
description: "Title displayed on the artifact. Defaults to a sensible name per type.",
|
|
208
|
+
},
|
|
209
|
+
data: {
|
|
210
|
+
type: "array",
|
|
211
|
+
items: {
|
|
212
|
+
type: "object",
|
|
213
|
+
properties: {
|
|
214
|
+
label: { type: "string", description: "Data point label (e.g. 'Q1 2025')" },
|
|
215
|
+
value: { type: "number", description: "Numeric value" },
|
|
216
|
+
color: { type: "string", description: "Optional hex color (e.g. '#4285F4'). Auto-assigned if omitted." },
|
|
217
|
+
},
|
|
218
|
+
required: ["label", "value"],
|
|
219
|
+
},
|
|
220
|
+
description: 'Data array for chart-3d type. Each item has {label, value, color?}. Required for "chart-3d", ignored for other types.',
|
|
221
|
+
},
|
|
222
|
+
options: {
|
|
223
|
+
type: "object",
|
|
224
|
+
properties: {
|
|
225
|
+
autoRotate: { type: "boolean", description: "Auto-rotate the model (default: true)" },
|
|
226
|
+
ar: { type: "boolean", description: "Enable AR on mobile devices (default: true)" },
|
|
227
|
+
backgroundColor: { type: "string", description: "Background color as hex (default: '#1a1a2e')" },
|
|
228
|
+
cameraOrbit: { type: "string", description: "Camera orbit string (default: '0deg 75deg 105%')" },
|
|
229
|
+
},
|
|
230
|
+
description: "Visual options for the 3D artifact.",
|
|
231
|
+
},
|
|
232
|
+
hotspots: {
|
|
233
|
+
type: "array",
|
|
234
|
+
items: {
|
|
235
|
+
type: "object",
|
|
236
|
+
properties: {
|
|
237
|
+
position: { type: "string", description: 'Hotspot 3D position, e.g. "0.5 1.2 0.3"' },
|
|
238
|
+
normal: { type: "string", description: 'Hotspot surface normal, e.g. "0 1 0"' },
|
|
239
|
+
label: { type: "string", description: "Hotspot label" },
|
|
240
|
+
description: { type: "string", description: "Hotspot description" },
|
|
241
|
+
},
|
|
242
|
+
required: ["position", "normal", "label"],
|
|
243
|
+
},
|
|
244
|
+
description: "Annotation hotspots for product-360 type. Each has position, normal, label, and optional description.",
|
|
245
|
+
},
|
|
246
|
+
shapes: {
|
|
247
|
+
type: "array",
|
|
248
|
+
items: {
|
|
249
|
+
type: "object",
|
|
250
|
+
properties: {
|
|
251
|
+
type: {
|
|
252
|
+
type: "string",
|
|
253
|
+
enum: ["cube", "sphere", "cylinder", "plane", "line"],
|
|
254
|
+
description: 'Shape type: "cube", "sphere", "cylinder", "plane" (flat surface), or "line" (thin cylinder connecting points).',
|
|
255
|
+
},
|
|
256
|
+
position: {
|
|
257
|
+
type: "array",
|
|
258
|
+
items: { type: "number" },
|
|
259
|
+
description: "Position [x, y, z] in world space. Y is up. Default: [0, 0, 0].",
|
|
260
|
+
},
|
|
261
|
+
scale: {
|
|
262
|
+
type: "array",
|
|
263
|
+
items: { type: "number" },
|
|
264
|
+
description: "Scale [x, y, z]. For cube: edge sizes. For sphere: diameters. For line: [length, thickness, thickness]. Default: [1, 1, 1].",
|
|
265
|
+
},
|
|
266
|
+
color: {
|
|
267
|
+
type: "array",
|
|
268
|
+
items: { type: "number" },
|
|
269
|
+
description: "Color [r, g, b] in 0-1 range. E.g. [1, 0, 0] for red, [0.2, 0.5, 1] for sky blue. Default: [0.8, 0.8, 0.8].",
|
|
270
|
+
},
|
|
271
|
+
metallic: {
|
|
272
|
+
type: "number",
|
|
273
|
+
description: "Metallic factor 0-1. 0 = plastic/matte, 1 = metal. Default: 0.",
|
|
274
|
+
},
|
|
275
|
+
roughness: {
|
|
276
|
+
type: "number",
|
|
277
|
+
description: "Roughness factor 0-1. 0 = mirror/glossy, 1 = rough/matte. Default: 0.5.",
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
required: ["type"],
|
|
281
|
+
},
|
|
282
|
+
description: 'Array of procedural 3D shapes for "geometry" type. Each shape has type, position, scale, color, metallic, roughness. Required for "geometry" type. Example: [{type:"cube",position:[0,0.5,0],scale:[1,1,1],color:[1,0,0]},{type:"sphere",position:[0,1.8,0],scale:[0.6,0.6,0.6],color:[0,0,1]}]',
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
required: ["type"],
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "get_platform_setup",
|
|
290
|
+
description: "Returns the complete setup guide for any SceneView-supported platform: Android, iOS, Web, Flutter, React Native, Desktop, or Android TV. Includes dependencies, manifest/permissions, minimum SDK, and a working starter template. Replaces `get_setup`, `get_ios_setup`, and `get_web_setup` with a single unified tool. Use this when a user wants to set up SceneView on any platform.",
|
|
291
|
+
inputSchema: {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
platform: {
|
|
295
|
+
type: "string",
|
|
296
|
+
enum: PLATFORM_IDS,
|
|
297
|
+
description: `Target platform:\n${PLATFORM_IDS.map((p) => `- "${p}"`).join("\n")}`,
|
|
298
|
+
},
|
|
299
|
+
type: {
|
|
300
|
+
type: "string",
|
|
301
|
+
enum: ["3d", "ar"],
|
|
302
|
+
description: '"3d" for 3D-only scenes. "ar" for augmented reality. Some platforms only support 3D.',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
required: ["platform", "type"],
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "migrate_code",
|
|
310
|
+
description: "Automatically migrates SceneView 2.x Kotlin code to 3.x. Applies known renames (SceneView→Scene, ArSceneView→ARScene), replaces deprecated APIs (loadModelAsync→rememberModelInstance, Engine.create→rememberEngine), fixes LightNode trailing-lambda bug, removes Sceneform imports, and more. Returns the migrated code with a detailed changelog. Use this when a user has 2.x code that needs updating, or when you detect 2.x patterns in their code.",
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: "object",
|
|
313
|
+
properties: {
|
|
314
|
+
code: {
|
|
315
|
+
type: "string",
|
|
316
|
+
description: "The SceneView 2.x Kotlin code to migrate. Can be a snippet, a function, or a full file.",
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
required: ["code"],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "debug_issue",
|
|
324
|
+
description: 'Returns a targeted debugging guide for a specific SceneView issue. Categories: "model-not-showing" (invisible models), "ar-not-working" (AR camera/planes), "crash" (SIGABRT/native), "performance" (low FPS/memory), "build-error" (Gradle/dependency), "black-screen" (no rendering), "lighting" (dark/bright/shadows), "gestures" (touch/drag), "ios" (Swift/RealityKit). You can provide a category directly, or describe the problem and it will be auto-detected. Use this when a user reports something not working.',
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: "object",
|
|
327
|
+
properties: {
|
|
328
|
+
category: {
|
|
329
|
+
type: "string",
|
|
330
|
+
enum: DEBUG_CATEGORIES,
|
|
331
|
+
description: `The issue category. If omitted, provide \`description\` for auto-detection.\n${DEBUG_CATEGORIES.map((c) => `- "${c}"`).join("\n")}`,
|
|
332
|
+
},
|
|
333
|
+
description: {
|
|
334
|
+
type: "string",
|
|
335
|
+
description: 'Free-text description of the issue (e.g., "my model is not showing", "app crashes on destroy"). Used for auto-detection when category is omitted.',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
required: [],
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: "generate_scene",
|
|
343
|
+
description: 'Generates a complete, compilable SceneView{} or ARSceneView{} Kotlin composable from a natural language description. Parses 40+ object types (furniture, vehicles, animals, food, buildings, nature), quantities ("two chairs", "3 spheres"), environment (indoor/outdoor/dark), and mode (3D or AR). Returns working Kotlin code with proper engine setup, model loading, lighting, and ground plane. Use this when a user says "build me a scene with..." or describes a 3D scene they want to create.',
|
|
344
|
+
inputSchema: {
|
|
345
|
+
type: "object",
|
|
346
|
+
properties: {
|
|
347
|
+
description: {
|
|
348
|
+
type: "string",
|
|
349
|
+
description: 'Natural language description of the desired 3D scene. Examples: "a room with a table and two chairs", "AR scene with a robot on the floor", "outdoor scene with three trees and a car", "dark room with a sphere and a cube", "a dog and a cat in a garden", "house with a fence and flowers".',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
required: ["description"],
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "list_platforms",
|
|
357
|
+
description: "Returns all platforms supported by SceneView with their renderer, framework, status, and version. Use this to answer questions about what platforms SceneView supports, or to show cross-platform capabilities.",
|
|
358
|
+
inputSchema: {
|
|
359
|
+
type: "object",
|
|
360
|
+
properties: {},
|
|
361
|
+
required: [],
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: "get_animation_guide",
|
|
366
|
+
description: "Returns a comprehensive guide for animating 3D models in SceneView — playing embedded glTF animations, Spring physics animations (KMP core), Compose property animations (animateFloatAsState, InfiniteTransition), SmoothTransform for smooth following, and AR animated models. Includes compilable Kotlin code samples. Use this when a user asks about animation, motion, springs, smooth movement, or how to play model animations.",
|
|
367
|
+
inputSchema: {
|
|
368
|
+
type: "object",
|
|
369
|
+
properties: {},
|
|
370
|
+
required: [],
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "get_gesture_guide",
|
|
375
|
+
description: "Returns a comprehensive guide for adding gestures to 3D objects in SceneView — isEditable for one-line pinch-to-scale/drag-to-rotate/tap-to-select, custom onTouchEvent handlers, AR tap-to-place, drag-to-rotate with sensitivity, pinch-to-scale with limits, multi-model selection, and HitResultNode surface cursor. Includes compilable Kotlin code samples. Use this when a user asks about touch, gestures, interaction, drag, pinch, tap, or editing 3D objects.",
|
|
376
|
+
inputSchema: {
|
|
377
|
+
type: "object",
|
|
378
|
+
properties: {},
|
|
379
|
+
required: [],
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "get_performance_tips",
|
|
384
|
+
description: "Returns a comprehensive performance optimization guide for SceneView — polygon budgets per device tier, LOD, texture compression (KTX2/Basis Universal), mesh compression (Draco/Meshopt), engine reuse, per-frame allocation avoidance, frustum culling, instancing, lighting optimization, post-processing costs, and profiling with Systrace and Android GPU Inspector. Includes code samples and CLI commands. Use this when a user asks about performance, optimization, FPS, memory, profiling, or slow rendering.",
|
|
385
|
+
inputSchema: {
|
|
386
|
+
type: "object",
|
|
387
|
+
properties: {},
|
|
388
|
+
required: [],
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: "get_material_guide",
|
|
393
|
+
description: "Returns a comprehensive guide for PBR materials in SceneView — baseColor, metallic, roughness, reflectance, emissive, clearCoat, normal maps. Includes recipes for common materials (glass, chrome, gold, rubber, car paint), code samples for modifying materials on ModelNode, texture setup, and environment lighting requirements. Use this when a user asks about materials, textures, colors, shaders, appearance, or why their model looks wrong (flat, dark, too shiny).",
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: "object",
|
|
396
|
+
properties: {},
|
|
397
|
+
required: [],
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: "get_collision_guide",
|
|
402
|
+
description: "Returns a comprehensive guide for collision detection, hit testing, and physics in SceneView — node tapping (onTouchEvent), AR surface hit testing (frame.hitTest), ray-box/ray-sphere intersection (KMP core), bounding boxes, and basic rigid body physics. Use this when a user asks about tapping 3D objects, collision detection, physics simulation, ray casting, or hit testing.",
|
|
403
|
+
inputSchema: {
|
|
404
|
+
type: "object",
|
|
405
|
+
properties: {},
|
|
406
|
+
required: [],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "get_model_optimization_guide",
|
|
411
|
+
description: "Returns a complete guide for optimizing 3D models for SceneView — polygon budgets per device tier, file size targets, Draco/Meshopt mesh compression, KTX2 texture compression, the recommended optimization pipeline (gltf-transform CLI), texture sizing rules, LOD strategies, and quick wins. Use this when a user asks about model optimization, file size, load times, polygon count, texture compression, or preparing models for mobile.",
|
|
412
|
+
inputSchema: {
|
|
413
|
+
type: "object",
|
|
414
|
+
properties: {},
|
|
415
|
+
required: [],
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
name: "get_web_rendering_guide",
|
|
420
|
+
description: "Returns a comprehensive guide for SceneView Web (Filament.js WASM) — architecture, quick start (sceneview.js npm or Kotlin/JS), IBL environment lighting (critical for PBR quality), rendering quality settings (SSAO, bloom, TAA), camera exposure tuning, Filament.js vs model-viewer comparison, and web performance tips. Use this when a user asks about web 3D rendering, Filament.js, browser viewing, WebGL, or wants to display 3D models in a web page.",
|
|
421
|
+
inputSchema: {
|
|
422
|
+
type: "object",
|
|
423
|
+
properties: {},
|
|
424
|
+
required: [],
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "search_models",
|
|
429
|
+
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.",
|
|
430
|
+
inputSchema: {
|
|
431
|
+
type: "object",
|
|
432
|
+
properties: {
|
|
433
|
+
query: {
|
|
434
|
+
type: "string",
|
|
435
|
+
description: "Free-text search query, e.g. \"red sports car\", \"low-poly pine tree\", \"sci-fi robot\".",
|
|
436
|
+
},
|
|
437
|
+
category: {
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Optional Sketchfab category slug to narrow results (e.g. \"cars-vehicles\", \"animals-pets\", \"architecture\", \"furniture-home\", \"weapons-military\").",
|
|
440
|
+
},
|
|
441
|
+
downloadable: {
|
|
442
|
+
type: "boolean",
|
|
443
|
+
description: "Restrict to downloadable models so you can actually load the asset. Default: true. Set to false to include view-only models.",
|
|
444
|
+
},
|
|
445
|
+
maxResults: {
|
|
446
|
+
type: "number",
|
|
447
|
+
description: "Maximum number of results to return. Clamped to [1, 10]. Default: 6.",
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
required: ["query"],
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: "analyze_project",
|
|
455
|
+
description: "Scans a local SceneView project on the user's machine and returns a structured analysis: detected project type (Android, iOS, Web), extracted SceneView dependency version, whether it is outdated vs the latest known release, and any known anti-patterns found by reading source files (threading violations, LightNode trailing-lambda bug, deprecated 2.x APIs, Sceneform imports). Safe: scans at most 30 source files and 500 KB total, never writes to disk. Use this when a user asks 'is my project up to date?', 'what's wrong with my SceneView code?', or when you want a fast sanity check of a project before generating code for it.",
|
|
456
|
+
inputSchema: {
|
|
457
|
+
type: "object",
|
|
458
|
+
properties: {
|
|
459
|
+
path: {
|
|
460
|
+
type: "string",
|
|
461
|
+
description: "Absolute or relative path to the project root to scan. Defaults to the current working directory of the MCP server.",
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
required: [],
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
];
|