Skip to main content
Glama

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

NameRequiredDescriptionDefault
cwdYesThe game project's folder.
pathNoA .glb, .gltf or USD file, or a folder to report every one under, relative to cwd.
shrinkNoRewrite 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.
targetNoWhat to judge the files against (site by default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.5
    • changedInput schema / properties / shrink / description
      Previous value: -"Rewrite the file smaller: textures false drops them all (geometry only), a number caps each texture's longer side at that many pixels (WebP); out is the new file (<name>-opt.glb by default). Replies with before and after."New value: +"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."
    • addedInput schema / properties / shrink / properties / drop
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / shrink / properties / triangles
      Added value: +{
      +  "type": "number"
      +}
  2. First observedv0.2.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false, so the useful disclosure here is real value-add: reads from the file itself with no decoder (so Draco/meshopt still report), `shrink` is lossy with a required before/after comparison, USD is converted to GLB first, and the output is a new file (-opt.glb by default) rather than an in-place edit. It does not state what happens when `out` already exists or how errors are surfaced, which keeps it off a 5.

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

Conciseness3/5

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

It is front-loaded with the audit purpose, and nearly every clause carries information, but the body is a single dense run-on paragraph stacked with semicolons and nested parentheses. The audit, verdict, and shrink behaviors would be far easier to parse as separate sentences or bullets.

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

Completeness4/5

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

For a complex tool with a nested `shrink` object and no output schema, the description covers the main behaviors an agent needs: what is measured, what the verdict compares against, what shrink produces, and the before/after reply. Gaps are the shape of the audit report itself and how failures or existing output files are reported.

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, but the description adds real meaning: `target` is spelled out with concrete budgets (site = 4 MB assets, 200,000 triangles, 2048 px textures by area; shopify = ~4 MB GLB with ≤2048 px sides), and `path` defaulting to the whole project is stated in prose. The `shrink` sub-fields are explained with intent (textures false = geometry only, number = caps longer side as WebP, drop removes nodes and their children), beyond the schema's own text.

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 names the exact resource and the exact measurements: .glb/.gltf/USD files, megabytes, triangles, materials, per-texture size and format, Draco/meshopt/KTX2 usage, plus a `shrink` rewrite mode. It also names the sibling it hands off to (`look` save/compare), so an agent can tell this apart from model_look or model_run without opening a schema.

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

Usage Guidelines4/5

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

Usage context is clear: audit one file or a whole folder, judge against `site` or `shopify`, and shrink a file that fails. It even prescribes a remediation sequence (save a look, shrink, repoint the page, compare the look). It stops short of explicit when-not-to-use guidance or naming the sibling that should be called instead of this tool for a quick visual check.

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