Skip to main content
Glama

Build a 3D model from code

godot_model_build
DestructiveIdempotent

Build a clean .glb from a ready-made kind or model spec, write it to a chosen path, lint it, and optionally add Godot collision shapes and a contract file.

Instructions

Build a clean .glb (UVs, tangents, one node per part, same bytes every time) from a ready-made kind or a model spec, write it to out, and lint it. Pass collision so Godot adds collision shapes when it imports the file (most models need one; nobody remembers to add it by hand). If the spec has an "archetype" (or the kind has one), the result is also checked against what that thing should be. Give kind (with optional params), spec or spec_file; contract_out also writes a model.contract.json that godot_model_lint can hold later versions to. out is replaced if it exists. Returns the size, triangle and node count, then the lint report (detail full lists every finding with its fix); 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 you did not build here, use godot_model_lint.

Input Schema

NameRequiredDescriptionDefault
outYeswhere to write the .glb, inside the project, e.g. models/car.glb
kindNoa ready-made kind: house, terrain, sea, airliner, apartment, barn, barrel, bicycle, boat, bridge, bus, bush, campfire, car, castle, chair, church, conifer, crate, dragon, drone, fence, fighter, flower, grass, helicopter, horse, humanoid, jet-engine, light-aircraft, motorcycle, palm, piston-engine, power-pylon, railway-track, road, rocket, rowing-boat, sailboat, satellite, ship, shipping-container, spaceship, street-lamp, table, tank, tower, tractor, train, tree, truck, wind-turbine, windmill
specNoa full model spec as a JSON object
detailNobrief: short output with capped lists; full: everything (default for this premium profile: full).
paramsNoparameter values, e.g. { width: 9, roof: 'hip' }
collisionNocollision 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_fileNoor a path to a spec JSON file inside the project
contract_outNoalso write a model.contract.json here (inside the project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • changedInput schema / properties / collision / description
      Previous value: -"name the meshes so Godot makes collision shapes on import: convex (a hull per mesh, for props and vehicles) or trimesh (exact triangles, for buildings and terrain)"New value: +"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)"
    • changedInput schema / properties / collision / enum
      Previous value: -[
      -  "convex",
      -  "trimesh"
      -]New value: +[
      +  "convex",
      +  "trimesh",
      +  "heightmap"
      +]
    • changedInput schema / properties / detail / description
      Previous value: -"Output detail (default for this premium profile: full)."New value: +"brief: short output with capped lists; full: everything (default for this premium profile: full)."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds genuinely non-obvious behavior beyond the destructive/idempotent annotations: `out` is replaced if it exists, builds are byte-stable, heightmap collision writes extra .tres/.tscn files, and an error result still leaves the file on disk. The one gap is that it doesn't say what specifically the lint errors imply for downstream use, but the critical surprise (file written on error) is disclosed.

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?

Front-loaded with the core action and tightly packed with useful constraints. Some parenthetical asides ('nobody remembers to add it by hand') and the run-on sentence about returns and error results add length without adding information, but nothing is redundant with the schema.

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?

With no output schema, the description must describe return values — it does (size, triangle and node count, then the lint report, with `detail` controlling verbosity). For a destructive, multi-input build tool, the description covers inputs, outputs, side effects, and escalation paths.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3; the description earns extra by explaining the mutual-exclusivity of `kind`/`spec`/`spec_file` (not expressed in the schema, which only requires `out`) and by giving the purpose of `collision` and `contract_out` rather than restating their descriptions.

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?

Opens with a specific verb+resource (build a .glb from a kind or spec) plus the three side effects: write to `out`, lint it, optionally write a contract. It also explicitly carves out its boundaries against siblings, pointing to godot_model_lint for .glb files built elsewhere.

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?

Gives concrete routing rules: call godot_model_identify first, godot_model_spec for the format, godot_model_lint for files not built here. It also states the input alternatives (kind + optional params, or spec, or spec_file) so the agent knows which path to take.

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