asset_labels
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: assets · Module: services.registry.capability_adapter
Maturity: stable (support status; independent of enabled state, readiness and permissions).
Description
Read or change asset labels with revision checks.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | Literal['get_labels', 'set_labels', 'add_labels', 'remove_labels'] | yes | Feature action to perform. |
path | str | None | — | Asset path required for asset operations; search defaults to Assets. Ignored for bundle assignment inspection. |
labels | list[str] | None | — | Exact labels; set replaces, empty set clears. |
label_targets | list[AssetLabelTarget] | None | — | Common-operation batch; each mutation row requires revision. |
label_revision | str | None | — | Opaque revision from get_labels for a single-target mutation. |
await_graph_seconds | float | None | — | Asset writes only: wait 0..30 seconds for the existing active graph receipt and first diff page; never activates a graph. |
unity_instance | str | 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
Read the labels on a prefab before filtering or making label changes. Replace the path with a prefab in your project.
MCP arguments
{
"action": "get_labels",
"path": "Assets/Prefabs/Player.prefab"
}