Skip to main content
Glama

Optimize GLB Model

sirv_optimize_glb

Shrink binary .glb 3D models by cleaning meshes and applying Draco compression, with optional simplification and texture compression for faster loading.

Instructions

Make a binary .glb 3D model of up to 100 MB smaller: mesh clean-up, Draco compression, and optional simplification and texture compression.

Use it after sirv_generate_3d_model, or for any GLB file that must load faster. Do not use it to make a model from a photo: use sirv_generate_3d_model.

Inputs: only glb_url is required. The clean-up and compression switches default to on. simplify_ratio 1 (the default) keeps the whole mesh; a lower value removes detail. texture_format and texture_size default to null, which keeps the textures as they are.

The source file does not change. Returns optimized_url, the size before and after in bytes, the reduction in per cent, and the vertex and triangle counts.

Credits: spends workspace credits. The cost depends on the model and options.

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": {
      "glb_url": "<glb_url>"
    },
    "name": "sirv_optimize_glb"
  }
}

Input Schema

NameRequiredDescriptionDefault
joinNoJoin separate meshes where possible. Default: true
weldNoMerge vertices that sit at the same point. Default: true
dedupNoRemove duplicate meshes, textures and materials. Default: true
dracoNoCompress the mesh with Draco. Default: true
pruneNoRemove unused data. Default: true
flattenNoFlatten the scene hierarchy. Default: true
glb_urlYesPublic HTTPS URL of a binary .glb file, up to 100 MB
instanceNoStore repeated meshes once. Default: true
quantizeNoStore vertex data with fewer bits before compression. Default: true
texture_sizeNoLargest texture side in pixels. Default: null, which keeps their size
simplify_errorNoLargest shape error simplification may cause, 0 to 1. Default: 0.001
simplify_ratioNoShare of the mesh to keep, 0 to 1. 1 keeps all of it. Default: 1
texture_formatNoConvert textures to this format. Default: null, which keeps their format

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.1.1
    • changedInput schema / properties / dedup / description
      Previous value: -"Remove duplicate vertices, meshes, textures, and materials"New value: +"Remove duplicate meshes, textures and materials. Default: true"
    • changedInput schema / properties / draco / description
      Previous value: -"Apply Draco mesh compression"New value: +"Compress the mesh with Draco. Default: true"
    • changedInput schema / properties / flatten / description
      Previous value: -"Flatten the scene hierarchy"New value: +"Flatten the scene hierarchy. Default: true"
    • changedInput schema / properties / glb_url / description
      Previous value: -"HTTPS URL of a binary .glb file up to 100 MB"New value: +"Public HTTPS URL of a binary .glb file, up to 100 MB"
    • changedInput schema / properties / instance / description
      Previous value: -"Instance repeated meshes"New value: +"Store repeated meshes once. Default: true"
    • changedInput schema / properties / join / description
      Previous value: -"Join separate meshes where possible"New value: +"Join separate meshes where possible. Default: true"
    • changedInput schema / properties / prune / description
      Previous value: -"Remove unused data from the model"New value: +"Remove unused data. Default: true"
    • changedInput schema / properties / quantize / description
      Previous value: -"Quantize vertex attributes before compression"New value: +"Store vertex data with fewer bits before compression. Default: true"
    • changedInput schema / properties / simplify_error / description
      Previous value: -"Maximum simplification error tolerance"New value: +"Largest shape error simplification may cause, 0 to 1. Default: 0.001"
    • changedInput schema / properties / simplify_ratio / description
      Previous value: -"Target mesh simplification ratio; 1 keeps full geometry"New value: +"Share of the mesh to keep, 0 to 1. 1 keeps all of it. Default: 1"
    • changedInput schema / properties / texture_format / description
      Previous value: -"Optional texture output format"New value: +"Convert textures to this format. Default: null, which keeps their format"
    • changedInput schema / properties / texture_size / description
      Previous value: -"Optional maximum texture dimension"New value: +"Largest texture side in pixels. Default: null, which keeps their size"
    • changedInput schema / properties / weld / description
      Previous value: -"Weld nearby duplicate vertices"New value: +"Merge vertices that sit at the same point. Default: true"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true), the description adds real operational context: the 100 MB input cap, that the source file is unchanged, the returned fields, and that the call spends workspace credits at a variable cost. It does not explain why the tool is non-idempotent or what happens on partial failure, which keeps it short of 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.

Conciseness5/5

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

Purpose is front-loaded, then routing guidance, then inputs, then return values, then cost — a logical order with no filler sentences. Every line carries decision-relevant information for an agent.

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 13-parameter mutation tool with no output schema, the description covers what is needed: required input, default behavior, the scale/limits, the fact that the source is preserved, the exact return fields, and the credit cost. Nothing essential for a correct invocation is missing.

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?

With 13 parameters at 100% schema description coverage, the schema already does the heavy lifting, so the baseline is 3. The description earns above that by synthesizing the meaning of the setting groups ('the clean-up and compression switches default to on') and by explaining the practical effect of simplify_ratio (1 keeps the whole mesh, lower removes detail) and of null texture settings (keep textures as they are).

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 opening sentence gives a specific verb and resource ('Make a binary .glb 3D model ... smaller') plus the exact techniques used (mesh clean-up, Draco, optional simplification and texture compression). It also names the sibling it is not (sirv_generate_3d_model), so the agent can distinguish the two without opening either schema.

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?

Explicit when-to-use ('after sirv_generate_3d_model, or for any GLB file that must load faster') and an explicit when-not with the correct alternative ('Do not use it to make a model from a photo: use sirv_generate_3d_model'). No inference is required to route between the two tools.

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