Skip to main content
Glama

find_nearest_point_on_mesh

Read-onlyIdempotent

Locate the closest point, triangle ID, and barycentric coordinates on a DynamicMeshActor's current mesh for any 3D query point, with an optional max search distance.

Instructions

Find the nearest point on the live dynamic mesh of a DynamicMeshActor to a 3D query point via UGeometryScriptLibrary_MeshSpatial::FindNearestPointOnMesh. Every call builds a fresh BVH from the mesh as it is now (the plugin keeps none), then queries it, so the answer always reflects the latest mesh edits. found is false when no triangle lies within max_distance, or the mesh is empty. The mesh is not changed.

Returns: { actor_name, found: bool, valid: bool, triangle_id, position_x/y/z, bary_coords_x/y/z } -- actor_name is the dynamic mesh component's name, not the actor label.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actor_nameYesLabel or name of the target DynamicMeshActor.
query_pointNo[x, y, z] query point in the mesh's local space.
max_distanceNoOptional float; max search distance (0 = unlimited).
allow_unsafe_modifiedNoOptional; maps to bAllowUnsafeModifiedQueries (default false). It has no effect: the BVH is built fresh on every call, so it always matches the mesh.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • changedInput schema / properties / allow_unsafe_modified / description
      Previous value: -"Optional; allow querying against a mesh modified since the BVH was built without re-syncing (maps to bAllowUnsafeModifiedQueries, default false)."New value: +"Optional; maps to bAllowUnsafeModifiedQueries (default false). It has no effect: the BVH is built fresh on every call, so it always matches the mesh."
  2. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower, yet the description still adds real behavior: a fresh BVH is built on every call so results track the latest mesh edits, the exact falsy conditions ('no triangle within max_distance, or the mesh is empty'), and the return shape. It only mildly restates the readOnly hint with 'The mesh is not changed'.

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-loaded with the core action, then behavior, then the falsy condition, then the return contract, each in its own tight sentence with no filler. The explicit 'Returns:' block is justified given there is no output schema.

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 4-parameter query tool with no output schema, the description supplies everything an agent needs: coordinate space, the meaning of actor_name, the edge-case result, and the full returned field list including barycentric coords.

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 baseline is 3, but the description adds disambiguation beyond the schema: it clarifies that actor_name is 'the dynamic mesh component's name, not the actor label', resolving an ambiguity the schema's own 'Label or name' wording leaves open. It also reiterates that allow_unsafe_modified is a no-op, though that largely duplicates the schema.

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 ('Find the nearest point on the live dynamic mesh of a DynamicMeshActor to a 3D query point') and even cites the underlying library call. An agent can tell it apart from siblings like find_nearest_ray_intersection_with_mesh, is_point_inside_mesh, and build_mesh_bvh 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 Guidelines3/5

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

The description establishes context (live mesh, always reflects latest edits) and the conditions under which 'found is false', but never explicitly says when to choose this over the sibling ray-intersection or BVH tools. Usage is implied by the BVH-rebuild note rather than stated as a routing rule.

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