Skip to main content

manage_navigation

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: core  ·  Module: services.tools.manage_navigation

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Read and explicitly author navigation surfaces, agents, obstacles and links. Use capabilities to detect the optional AI Navigation package/version and discover configured agent_types (first 100, with count/truncation), named areas (up to 32), and installed-version supported_properties by kind without changing settings. Scene operations require an explicit loaded scene_handle; targets are exact component or GameObject instance IDs. add accepts an optional properties object to validate, create and configure one component in one Undo group; invalid settings leave no new component. add/configure return property readback and static warnings. Bake requires an active surface using Children collection and returns a queued job; poll bake_status for native completion. Queued jobs can be cancelled; the synchronous native bake cannot be interrupted. No automatic global bake or project-setting changes. Path and sample queries use agent_type_id/area_mask and report scene attribution limits of Unity's global NavMesh. Save authored scenes explicitly.

Parameters​

NameTypeRequiredDescription
actionLiteral['capabilities', 'list', 'read', 'add', 'configure', 'bake', 'bake_status', 'cancel_bake', 'sample_position', 'calculate_path']yesExplicit navigation action.
scene_handleint | None—Loaded scene handle; required for scene operations.
kindLiteral['surface', 'agent', 'obstacle', 'link'] | None—Component kind.
targetint | None—Exact component or scene GameObject instance ID.
propertiesdict[str, JsonValue] | None—Use capabilities.supported_properties for keys available in the installed version. Vectors are [x,y,z], enums use names; all kinds support enabled. Surface: agentTypeID/collectObjects/useGeometry/layerMask/defaultArea/center/size/overrideTileSize/tileSize/overrideVoxelSize/voxelSize/buildHeightMesh. Agent: agentTypeID/areaMask/speed/angularSpeed/acceleration/stoppingDistance/radius/height/baseOffset/autoBraking/autoRepath/autoTraverseOffMeshLink/avoidancePriority/obstacleAvoidanceType/updatePosition/updateRotation/updateUpAxis. Obstacle: shape/center/size/radius/height/carving/carveOnlyStationary/carvingMoveThreshold/carvingTimeToStationary. Link: agentTypeID/area/startPoint/endPoint/width/bidirectional/costModifier/autoUpdate.
job_idstr | None—Bake job ID for bake_status or cancel_bake.
positionlist[float] | None—World point for sample_position.
startlist[float] | None—World start for calculate_path.
endlist[float] | None—World end for calculate_path.
agent_type_idint | None—Configured NavMesh agent type; required for queries.
area_maskint | None—Query area bitmask; default all areas (-1).
max_distancefloat | None—Sample radius, greater than zero and at most 100.
offsetint | None—List offset, nonnegative.
limitint | None—List page size 1..100 (default 50).
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Check whether the selected Editor supports AI Navigation components and operations before querying a NavMesh.

MCP arguments
{
"action": "capabilities"
}