Skip to main content
Glama

create_procedural_grid_mesh

Destructive

Build a flat welded grid mesh with X/Y vertex counts and spacing in a UProceduralMeshComponent section on an editor actor found by label, replacing or appending that section.

Instructions

Build a flat welded grid of num_x by num_y vertices spaced grid_spacing apart, centred on the component origin in its XY plane with 0-1 UVs and +Z normals, and write it into section_index of a UProceduralMeshComponent on an editor-world actor found by label, replacing that section if it exists, or appending a new one when section_index equals the section count. A missing actor or component, or a section_index that is negative or past the section count, is an error checked before anything changes. num_x * num_y is capped at 1,000,000 vertices (1000 x 1000) because each grid vertex costs about 300 bytes across the generated arrays, the section copy and the render buffers, so one call stays near 300 MB with every index far inside int32; a larger grid, or a count outside int32, is an error too. Transient: nothing is marked dirty, saved or undoable. Add the component with create_procedural_mesh_component first; create_procedural_box_mesh builds a box.

Returns: { actor_label: string, section_index: int, vertex_count: int, triangle_count: int, total_sections: int }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
num_xNoOptional vertex count along X (the grid has num_x - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000
num_yNoOptional vertex count along Y (the grid has num_y - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000
actor_labelYesEditor label of the actor carrying the PMC
grid_spacingNoOptional grid cell size in world units; defaults to 16.0
section_indexNoOptional target section index, 0 to the current section count (which appends a new section); defaults to 0
component_indexNoOptional 0-based PMC index on the actor; defaults to 0
create_collisionNoOptional bool; defaults to false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.2
    • changedInput schema / properties / num_x / description
      Previous value: -"Optional vertex count along X (the grid has num_x - 1 cells; below 2 there is no geometry); defaults to 10"New value: +"Optional vertex count along X (the grid has num_x - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000"
    • changedInput schema / properties / num_y / description
      Previous value: -"Optional vertex count along Y (the grid has num_y - 1 cells; below 2 there is no geometry); defaults to 10"New value: +"Optional vertex count along Y (the grid has num_y - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000"
    • changedInput schema / properties / section_index / description
      Previous value: -"Optional target section index; defaults to 0"New value: +"Optional target section index, 0 to the current section count (which appends a new section); defaults to 0"
  2. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / num_x / description
      Previous value: -"Optional X subdivision count; defaults to 10"New value: +"Optional vertex count along X (the grid has num_x - 1 cells; below 2 there is no geometry); defaults to 10"
    • changedInput schema / properties / num_y / description
      Previous value: -"Optional Y subdivision count; defaults to 10"New value: +"Optional vertex count along Y (the grid has num_y - 1 cells; below 2 there is no geometry); defaults to 10"
  3. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive=true, readOnly=false and non-idempotent, but the description goes well beyond them: it discloses the replace-existing-section versus append-new-section semantics, that all error conditions (missing actor/component, out-of-range section_index) are validated before anything mutates, the ~300 bytes/vertex memory model, and that the operation is transient (nothing marked dirty, saved, or undoable). This is exactly the extra context the annotations cannot convey.

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?

Front-loaded with the core action, then constraints, preconditions, and return shape in a logical order; the return-key list at the end is compact. It is a single dense paragraph that runs long, and the 300-bytes/300 MB explanation is somewhat verbose for what it contributes, but no sentence is filler.

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 7-parameter destructive geometry tool with no output schema, the description covers the full burden: geometry semantics, section targeting, error preconditions, size and int32 limits, memory footprint, transience, and an inline return-shape declaration. Nothing an agent needs to call it correctly 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 100% schema coverage the baseline is 3, but the description adds meaning the schema does not: the rationale for the 1,000,000-vertex cap (per-vertex byte cost, ~300 MB ceiling, int32-safety), the +Z normal / 0-1 UV conventions the generated geometry will carry, and the append-when-section_index-equals-count behavior. It does not, however, explain component_index or create_collision, which remain schema-only.

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 precise verb+resource (build a flat welded grid of num_x by num_y vertices) plus geometry specifics: XY plane, component origin, 0-1 UVs, +Z normals, and the exact destination (section_index of a UProceduralMeshComponent on an actor found by label). It explicitly distinguishes itself from the sibling create_procedural_box_mesh. An agent can identify this tool 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 the prerequisite explicitly ("Add the component with create_procedural_mesh_component first") and names the alternative for a different shape ("create_procedural_box_mesh builds a box"). The replace-vs-append condition on section_index tells the agent exactly which call produces which outcome, leaving nothing to inference.

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