Skip to main content

diagnose_physics

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: physics  ·  Module: services.registry.capability_adapter

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

Description​

Validate physics setup or inspect a pair of colliders and passive contacts. May start or stop passive contact observation without advancing simulation.

Parameters​

NameTypeRequiredDescription
actionLiteral['validate', 'diagnose_pair']yesFeature action to perform.
dimensionstr | None—Physics dimension: '3d' (default) or '2d'.
targetstr | None—Target GameObject name or instance ID.
collider_typestr | None—Specific collider type to target.
search_methodstr | None—Search method for target resolution.
page_sizeint | None—Page size for validate results: 1-1000 (default 50).
cursorint | None—Cursor offset for validate pagination.
component_indexint | None—Zero-based index to select which component when multiple of the same type exist (e.g., multiple HingeJoints or BoxColliders). If omitted, targets the first instance.
other_targetstr | None—diagnose_pair: second GameObject name, path or instance ID.
other_collider_typestr | None—diagnose_pair: exact second collider type when needed.
other_component_indexint | None—diagnose_pair: zero-based second collider index after type filtering.
other_search_methodLiteral['by_id', 'by_name', 'by_path'] | None—How to resolve other_target; inferred independently when omitted.
contact_limitint | None—diagnose_pair: 2D contact-point sample size, 1–128 (default16); 3D reports event counts.
observe_contactsbool | str | None—diagnose_pair: opt in to a60-second passive3D pair watch; false stops, omitted only reads. Never simulates or enables contact generation.
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​

Inspect collider evidence for one scene object. Replace Player with the object to diagnose. The small page is useful when the object owns multiple colliders.

MCP arguments
{
"action": "validate",
"dimension": "3d",
"target": "Player",
"search_method": "by_name",
"page_size": 10
}