Skip to main content
Glama

Shrink a static mesh without a visible change

mesh_optimize
Idempotent

Simplify heavy static GLB meshes with meshoptimizer, validating silhouette and grayscale similarity from six angles before writing an optimized copy and downscaling oversized textures.

Instructions

Simplify a heavy static GLB with meshoptimizer under a rendered before/after gate: each error-ladder candidate must keep its silhouette (IoU >= 0.98) and mean grayscale difference (<= 2%) from six angles, or the original is kept and nothing is written. Resizes textures above maxTextureSize, never compresses the output, never overwrites the input, and refuses skinned or morph-target meshes.

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": {
      "path": "<path>"
    },
    "name": "mesh_optimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a static GLB (no skin or morph targets).
outputPathNoOutput .glb path. Defaults to <name>.optimized.glb next to the input; never the input itself.
maxTextureSizeNoLongest texture side kept; larger textures are downscaled in their own format.

Output Schema

NameRequiredDescriptionDefault
gateYes
keptYes
inputYes
outputYes
attemptsYes
previewsYes
maxTextureSizeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true; beyond that the description adds real value by disclosing the IoU >= 0.98 and 2% grayscale acceptance thresholds, the fail-safe of keeping the original and writing nothing, and the never-compress/never-overwrite guarantees. These are concrete behavioral traits not present in the structured fields.

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?

Two dense sentences with no filler; the primary mechanism leads and the constraint list follows. The second sentence is a long run-on of guarantees that could be split, but each clause carries distinct information.

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?

Given an output schema exists, return values needn't be explained, and the description covers rejection rules, quality gate, and write safety for a mutation tool. An agent has enough to decide and invoke correctly; only the interaction between maxTextureSize and the gate thresholds is left implicit.

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

Parameters3/5

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

Schema coverage is 100%, so all three parameters are already documented, and the description only restates maxTextureSize behavior and the no-overwrite rule for outputPath rather than adding format or syntax detail. With the schema doing the heavy lifting, the baseline 3 applies.

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 specific verb and resource (simplify a heavy static GLB with meshoptimizer) and immediately names the governing mechanism, the rendered before/after quality gate. An agent can tell exactly what this tool produces without opening the 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?

Gives a clear when-not condition (refuses skinned or morph-target meshes) and scopes usage to heavy static GLBs, so the agent knows which inputs are rejected. It does not name an explicit alternative for non-static assets, but no sibling appears to overlap, so the gap is minor.

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