model_audit
Inspect .glb, .gltf, and USD 3D models for size, triangles, materials, textures, and compression, then compare them against site or Shopify budgets and shrink oversized files.
Instructions
Inspects 3D model files (.glb, .gltf, and USD: .usd, .usda, .usdc, .usdz): megabytes, triangles, materials, each texture's size and format, and whether it uses Draco, meshopt and KTX2, for one file or every one under a folder (path, relative to cwd; the whole project when left out), read from the file itself with no decoder, so Draco and meshopt files report too. Then a one-line verdict on what a website or a Shopify listing judges a model on, against target: site (the site budget: 4 MB of assets, 200,000 triangles, 2048 px textures by area) or shopify (a GLB of about 4 MB with textures at most 2048 px on a side). shrink rewrites one .glb or .gltf smaller, without its textures or with each capped at a size (WebP), decimated to about a triangle count (welded or not), or without nodes named in drop, and replies with before and after (a USD file is converted to GLB first); a failing file gets the shrink call that fixes it: save a look first (look save), shrink, point the page at the new file, then look compare.
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": {
"cwd": "<cwd>"
},
"name": "model_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | The game project's folder. | |
| path | No | A .glb, .gltf or USD file, or a folder to report every one under, relative to cwd. | |
| shrink | No | Rewrite the file smaller: textures false drops them all (geometry only), a number caps each texture's longer side at that many pixels (WebP); triangles decimates the whole file to about that many (meshoptimizer, sloppy where the mesh's triangles share no vertex; lossy, so compare a look after); drop removes the nodes with those names and their children (a fence, a plinth); out is the new file (<name>-opt.glb by default). Replies with before and after. | |
| target | No | What to judge the files against (site by default). |