getRuntimeSetup
Configure runtime environment settings for the 3D design tool to enable scene operations, model imports, and animation creation through natural language commands.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/runtime-tools.js:11-38 (registration)Registration of the 'getRuntimeSetup' tool using server.tool() with empty input schema and inline async handler.server.tool( 'getRuntimeSetup', {}, async () => { try { const setupCode = runtimeManager.generateRuntimeSetup(); return { content: [ { type: 'text', text: setupCode } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error generating setup code: ${error.message}` } ], isError: true }; } } );
- src/tools/runtime-tools.js:14-37 (handler)The inline async handler function that executes the tool logic by calling runtimeManager.generateRuntimeSetup() and returning the formatted response or error.async () => { try { const setupCode = runtimeManager.generateRuntimeSetup(); return { content: [ { type: 'text', text: setupCode } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error generating setup code: ${error.message}` } ], isError: true }; } }
- src/utils/runtime-manager.js:35-73 (helper)RuntimeManager.generateRuntimeSetup() method providing the core logic: installation commands and complete HTML example for Spline runtime setup.generateRuntimeSetup() { return ` # Installing @splinetool/runtime npm install @splinetool/runtime # For React projects, also install npm install @splinetool/react-spline # Basic HTML setup: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Spline Scene</title> <style> html, body { margin: 0; height: 100%; overflow: hidden; } #canvas3d { width: 100%; height: 100%; display: block; } </style> </head> <body> <canvas id="canvas3d"></canvas> <script type="module"> import { Application } from '@splinetool/runtime'; // Create application const canvas = document.getElementById('canvas3d'); const spline = new Application(canvas); // Load scene spline.load('https://prod.spline.design/YOUR_SCENE_ID/scene.splinecode') .then(() => { console.log('Scene loaded'); // Interact with scene here }); </script> </body> </html> `; }
- src/index.js:104-104 (registration)Top-level call to registerRuntimeTools(server) in main MCP server setup, which includes registration of getRuntimeSetup.registerRuntimeTools(server);