Build a 3D model from code
godot_model_buildBuild a clean, deterministic .glb from a ready-made kind or model spec, write it to the target path, and lint it for errors, optionally adding collision and a model contract.
Instructions
Build a clean .glb (UVs, tangents, one node per part, same bytes every time) from a ready-made kind (with params), a model spec or a spec_file, write it to out (replaced if it exists) and lint it. If the spec or kind has an "archetype", the result is also checked against what that thing should be. Pass collision: most models need one. contract_out also writes a model.contract.json that godot_model_lint can hold later versions to. Returns the size, triangle and node count, then the lint report; an error result when the lint finds errors, though the file is still written. Call godot_model_identify first and godot_model_spec for the format; to check a .glb not built here, use godot_model_lint.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"out": "<out>"
},
"name": "godot_model_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | where to write the .glb, inside the project, e.g. models/car.glb | |
| kind | No | a ready-made kind: house, terrain, sea, airliner, apartment, barn, barrel, bicycle, boat, bridge, bus, bush, campfire, car, castle, chair, church, conifer, crash-barrier, crate, delineator, dragon, drone, fence, fighter, flower, grandstand, grass, guard-rail, helicopter, horse, humanoid, jet-engine, light-aircraft, motorcycle, palm, piston-engine, power-pylon, race-kerb, railway-track, road, rocket, rowing-boat, sailboat, satellite, ship, shipping-container, spaceship, street-lamp, table, tank, tower, tractor, traffic-light, traffic-sign, train, tree, truck, wind-turbine, windmill; or a library asset id from godot_model_library, e.g. furniture/dining-chair-oak-ladder | |
| spec | No | a full model spec as a JSON object | |
| detail | No | brief (capped lists) or full (everything); default full | |
| params | No | parameter values, e.g. { width: 9, roof: 'hip' } | |
| textures | No | false writes plain colours instead of the texture maps of brick, wood, leaves and the like (smaller files, or for materials of your own); default true | |
| collision | No | collision for Godot: convex (a hull per mesh on import, for props and vehicles), trimesh (exact triangles on import, for buildings), or heightmap (terrain tiles: writes <name>.heightmap.tres and <name>.tscn with a StaticBody3D, faster than trimesh) | |
| spec_file | No | or a path to a spec JSON file inside the project | |
| contract_out | No | also write a model.contract.json here (inside the project) |