Skip to main content
Glama

build_scene

Builds a Unity scene from a JSON specification, including objects, materials, components, and post-processing. Automates scene creation for Unity projects.

Instructions

Baut aus einer JSON-Spezifikation eine echte .unity-Szene (via injiziertes C#), als Job.

spec = { "scenePath": "Assets/Scenes/Game.unity", "addToBuildSettings": true, "gameObjects": [ {"name":"Main Camera","camera":true,"position":[0,1,-10]}, {"name":"Sun","light":{"type":"Directional","intensity":1.0},"rotation":[50,-30,0]}, {"name":"Floor","primitive":"Plane","scale":[5,1,5]}, {"name":"Player","primitive":"Capsule","position":[0,1,0],"tag":"Player", "components":["Rigidbody","PlayerController"]} ] } components dürfen eingebaute Typen (Rigidbody, BoxCollider …) ODER eigene MonoBehaviour- Klassennamen sein (vorher per write_script anlegen).

PROFI-Features pro gameObject (optional): "material": {"color":[r,g,b],"metallic":0.0,"smoothness":0.6,"emission":[r,g,b],"emissionIntensity":2.0, "mainTexture":"Assets/.../baseColor.png","normalMap":"Assets/.../normal.png", "occlusionMap":"Assets/.../ao.png","metallicGlossMap":"Assets/.../mask.png","normalScale":1.0} (URP-aware, wird als .mat gespeichert+zugewiesen; PBR-Maps automatisch korrekt importiert: normalMap→NormalMap+_NORMALMAP, ao/mask→linear. Maps z.B. via download_pbr_material / download_polyhaven_texture holen = Premium-Look) "physicMaterial": {"bounciness":0.8,"dynamicFriction":0.3,"staticFriction":0.4} "props": Komponenten-Properties setzen (Werte/Referenzen/Assets/Enums/Vektoren/Farben), z.B. {"component":"Rigidbody","name":"mass","value":2.0} {"component":"Rigidbody","name":"linearDamping","value":0.5} # Unity-6-Name (alt: drag) {"component":"Rigidbody","name":"constraints","enum":"FreezeRotationX|FreezeRotationZ"} {"component":"CameraFollow","name":"target","ref":"Player"} # Referenz auf Scene-Objekt {"component":"AudioSource","name":"clip","asset":"Assets/Audio/x.wav"} {"component":"Light","name":"color","color":[1,0.9,0.7]} "prefab": "Assets/Prefabs/X.prefab" # statt primitive eine Prefab-Instanz erzeugen "isStatic": true, "tag":"Player", "layer":8, "parent":"OtherObjectName" Top-Level optional: "environment": {"ambientMode":"Trilight","ambient":[r,g,b],"skyboxMaterial":"Assets/...","fog":true,"fogColor":[..],"fogDensity":0.01} "postProcessing": {"bloom":{"intensity":1.2,"threshold":0.9,"scatter":0.7}, "colorAdjustments":{"postExposure":0.2,"contrast":10,"saturation":15}, "vignette":{"intensity":0.3},"tonemapping":{"mode":"ACES"}, "antialiasing":"SubpixelMorphologicalAntiAliasing"} (URP; Bloom braucht emissive/HDR-Quellen) "saveAsPrefabs": [{"object":"Enemy","path":"Assets/Prefabs/Enemy.prefab"}] Ergebnis via get_build_result(result_file).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
specYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description details behavior: it's a job that injects C# to create a scene file. Annotations are minimal (readOnlyHint=false, destructiveHint=false). While it doesn't explicitly state overwrite behavior or permissions, it offers rich behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured: starts with a concise summary, then uses bullet points and code blocks for details. It could be slightly more concise, but the structure aids readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (nested objects, many optional features), the description is highly complete. It covers the full spec structure, component properties, materials, environment, post-processing, prefab instantiation, and result retrieval via get_build_result, leaving no major gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description exhaustively documents the spec parameter with a full example and lists all nested fields (materials, physics, props, environment, postProcessing, etc.), adding immense value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool builds a .unity scene from a JSON specification via injected C# as a job. It gives a comprehensive example and details the spec structure, distinguishing it from siblings by its unique purpose of scene creation from JSON.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive usage guidelines, including how to structure the spec, optional features (materials, physics, props, prefab, etc.), and references to related tools (write_script, get_build_result, download_pbr_material). It implicitly advises when to use this tool for programmatic scene creation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/MauricePutinas/Unity-MCP-Claude-Code'

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