Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
WS_PORTNoWebSocket bridge port8083
CHAT_PROVIDERNoWhich AI provider key to prefer (openai or anthropic)openai
OPENAI_API_KEYNoOpenAI API key to enable direct in-world AI chat
ANTHROPIC_API_KEYNoAnthropic API key as an alternative AI provider
AUTO_OPEN_BROWSERNoOpen the 3D client automaticallytrue
DEFAULT_FRAMEWORKNoWhich client to open (e.g., threejs, a-frame, babylonjs, r3f)threejs

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
createObjectA

Add a 3D object to the live scene. Returns the assigned id. Always call getSceneState first to understand what already exists.

updateObjectC

Update any properties of an existing 3D object. Supports partial updates.

deleteObjectC

Remove a 3D object from the scene by id.

cloneObjectC

Duplicate an object with an optional position offset.

getObjectC

Get properties of a single scene object by id.

getSceneStateA

Get the full current scene state: all objects, lights, camera, and environment. Call this first before making any changes.

createLightC

Add a light to the scene.

updateLightC

Update an existing light by id.

deleteLightC

Remove a light from the scene by id.

setCameraC

Set the camera position and look-at target.

flyToObjectB

Smoothly move the camera to look at an object.

animateObjectA

Animate an object property to a target value. Supports transforms (position, rotation, scale) and material properties (emissiveIntensity, opacity, color) for pulsing glow, fading, color shifts.

stopAnimationC

Stop any running animation on an object.

setEnvironmentC

Configure the scene environment: background, fog, tone mapping, shadows, and post-processing effects.

createParticlesA

Create a particle system (stars, dust, sparks, snow, fire embers, laser trails). Uses GPU-efficient point sprites with optional drift animation and twinkle.

updateParticlesC

Update properties of an existing particle system.

deleteParticlesC

Remove a particle system from the scene.

executeScriptA

Execute arbitrary JavaScript code in the connected browser scene context. The code runs inside an async function with access to: scene (THREE.Scene), camera, renderer, controls, and a helpers object. Return a value to send it back. Use this for advanced effects the other tools cannot achieve — custom shaders, complex geometry, procedural generation, physics, etc.

addBehaviorA

Attach a continuous frame-tick behavior to an object. Behaviors run every frame until removed. Types: spin (rotate continuously), bob (oscillate up/down), orbit (circle around a point), lookAt (always face camera), pulse (rhythmic scale breathing).

removeBehaviorC

Remove a behavior by its ID, stopping its frame-tick effect.

clearSceneA

Remove all user-created objects from the scene and reset default lighting.

loadSceneB

Replace the entire scene with a previously exported scene JSON.

exportSceneA

Export the current scene as a JSON string (can be stored and re-loaded later).

saveSceneB

Save the current scene to a JSON file in the scenes/ folder. Returns the file path.

listScenesB

List all saved scene JSON files in the scenes/ folder.

loadSceneFromFileC

Load a previously saved scene from the scenes/ folder by name.

exportStandaloneSceneA

Export the current scene as a standalone HTML file that plays in any browser without a server. Includes all objects, lights, materials, animations, camera, and environment. No chat UI. Saved to the scenes/ folder. Returns the file path.

undoB

Undo the last scene change (up to 20 levels).

redoB

Redo a previously undone scene change.

takeScreenshotA

Capture the current 3D viewport and return a base-64 PNG data URL. Requires a browser client to be connected.

getPendingUserMessagesA

Return any in-world chat messages the user has typed from inside the 3D environment. Call this at the start of every turn to check for user input from the canvas.

sendChatMessageA

Display a message in the in-world chat overlay visible to the user inside the 3D view.

clearPendingMessagesA

Clear all queued in-world user messages (useful after processing a batch).

Prompts

Interactive templates invoked by user choice

NameDescription
3d-world-assistantTransform the AI into a creative 3D scene designer with expertise in lighting, composition, and spatial aesthetics. Teaches thoughtful scene creation, not just technical object placement.
framework-guideFramework-specific creative guidance and technical tips for Three.js, A-Frame, Babylon.js, or React Three Fiber.
demo-showcaseInstant access to 10+ stunning pre-built demo templates: galaxy, DNA helix, neon tunnel, crystal cluster, platonic solids, particle effects, and more. Perfect for quick impressive visualizations.

Resources

Contextual data attached and managed by the client

NameDescription
Current Scene StateLive JSON snapshot of all objects, lights, camera, and environment.
Connected Browser SessionsList of currently connected 3D browser clients.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/m-ai-geXR/mcp-webgpu'

If you have feedback or need assistance with the MCP directory API, please join our Discord server