Skip to main content
Glama

Build a 3D model from code

godot_model_build
DestructiveIdempotent

Build 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

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, 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
specNoa full model spec as a JSON object
detailNobrief (capped lists) or full (everything); default full
paramsNoparameter values, e.g. { width: 9, roof: 'hip' }
texturesNofalse 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
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. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / kind / description
      Previous value: -"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"New value: +"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"
  2. Changed2 schema fields changedv0.6.0
    • changedInput schema / properties / detail / description
      Previous value: -"brief: short output with capped lists; full: everything (default for this premium profile: full)."New value: +"brief (capped lists) or full (everything); default full"
    • changedInput schema / properties / kind / description
      Previous value: -"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-sign, train, tree, truck, wind-turbine, windmill"New value: +"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"
  3. Changed2 schema fields changedv0.2.2
    • changedInput schema / properties / kind / description
      Previous value: -"a 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"New value: +"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-sign, train, tree, truck, wind-turbine, windmill"
    • addedInput schema / properties / textures
      Added value: +{
      +  "description": "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",
      +  "type": "boolean"
      +}
  4. 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)."
  5. 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 substantial behavior beyond the annotations: `out` is replaced if it exists (matching destructiveHint), output is byte-identical across runs (matching idempotentHint), and the result is still written even when lint fails and an error is returned. It also describes the return payload (size, triangle/node counts, lint report) and the extra archetype check, which no structured field conveys. Minor gap: no mention of overwrite confirmation or failure modes for a missing/invalid spec.

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-loads the action and artifact, then modes, then side effects, then return contract, then sibling routing — a sensible ordering with no filler. The sentences are long and densely parenthetical, which costs a little readability, but no sentence is expendable.

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?

For a 9-parameter, nested-object, multi-mode generation tool with no output schema, the description covers inputs, side effects, overwrite semantics, error-but-written behavior, and the return payload. An agent has everything needed to call it correctly and interpret the result.

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 the baseline is 3; the description still adds meaning by framing `kind`, `spec` and `spec_file` as alternative sources, advising when to use `collision`, and explaining that `contract_out` produces a contract godot_model_lint can later hold versions to. It slightly exceeds what the schema already says rather than merely restating it.

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?

States a concrete verb and artifact: build a .glb from a `kind`/`spec`/`spec_file`, write it to `out`, and lint it. The parenthetical quality guarantees (UVs, tangents, one node per part, deterministic bytes) pin down what kind of build this is, and the sibling tools it names (identify, spec, lint) are each given a distinct role.

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?

Explicitly routes the agent: call godot_model_identify first, godot_model_spec for the format, and godot_model_lint for a .glb not built here. It also gives a default recommendation ("Pass `collision`: most models need one") and explains the three mutually exclusive input modes.

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