Skip to main content
Glama

auto_generate_mesh_uvs

Destructive

Generates a UV unwrap for a mesh using patch builder or xatlas, packing islands into standard UV space. Use for organic or mixed-orientation geometry when projection fails.

Instructions

Compute a real UV UNWRAP for the whole mesh via UGeometryScriptLibrary_MeshUVFunctions::AutoGeneratePatchBuilderMeshUVs or AutoGenerateXAtlasMeshUVs. This is what sits behind the editor's "Auto UV" button. Use it when a projection is not enough (organic or mixed-orientation geometry); for plank-and-post shapes set_mesh_uvs_from_projection with box is usually cleaner and far cheaper. Both methods PACK the result into standard UV space by default, so island layout is handled too. SLOW on dense meshes: this is a solver, not a projection. A UV channel the mesh does not have, or an empty mesh, is an error; applied is false, and the call fails, when the solver reports an error (xatlas needs a compact mesh: run compact_mesh first).

Returns: { actor_name, method, uv_channel, triangle_count: int, uv_channel_count: int, applied: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNo'patch_builder' (default, the editor's Auto UV) or 'xatlas'.
auto_packNoPack the resulting islands into standard UV space (default true).
actor_nameYesLabel or name of the target DynamicMeshActor.
uv_channelNoUV channel to write (default 0).
max_angle_degNopatch_builder: max angle in degrees between merged patches (default 45).
max_iterationsNoxatlas: solver iterations (default 2). Higher is slower and slightly tighter.
min_patch_sizeNopatch_builder: minimum triangles per patch (default 2).
merging_thresholdNopatch_builder: patch merging metric threshold (default 1.5). Higher merges more aggressively, giving fewer islands.
respect_polygroupsNopatch_builder: seed patches from the existing polygroups instead of curvature (default false). Useful right after append_mesh_primitive, where each appended face is already its own group.
initial_patch_countNopatch_builder: how many patches to seed (default 100). More patches = less distortion, more seams.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantial behavioral context: performance profile ('SLOW on dense meshes: a solver, not a projection'), the fact that results are packed into standard UV space by default, and failure semantics — a missing UV channel or empty mesh is an error and applied=false when the solver errs.

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?

Front-loads the core action, then layers usage, then performance and error caveats. Dense but every sentence earns its place — there is no filler or repetition of the name.

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?

No output schema exists, but the description inlines the return shape ({actor_name, method, uv_channel, triangle_count, uv_channel_count, applied}). Combined with error/prerequisite/performance disclosure for a 10-parameter solver, an agent has everything needed to invoke it correctly.

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 every parameter is already documented, making 3 the baseline. The description adds method-selection tradeoffs (patch_builder mimics the editor Auto UV; xatlas needs a compact mesh) and confirms auto_pack behavior, adding meaning beyond the schema without detailing every parameter.

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+resource ('Compute a real UV UNWRAP for the whole mesh'), names the underlying UE functions, and explicitly distinguishes itself from the projection sibling by describing the editor 'Auto UV' button it implements. An agent can tell it apart from set_mesh_uvs_from_projection, repack_mesh_uvs, and recompute_mesh_uvs without opening any 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?

Gives explicit when-to-use ('when a projection is not enough — organic or mixed-orientation geometry') and when-not ('for plank-and-post shapes set_mesh_uvs_from_projection with box is usually cleaner and far cheaper'), naming the alternative tool by name. It also notes the compact_mesh prerequisite for xatlas.

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

Deploy Server

Other Tools