Skip to main content

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​

NameTypeRequiredDescription
actionLiteral['get_labels', 'set_labels', 'add_labels', 'remove_labels']yesFeature action to perform.
pathstr | None—Asset path required for asset operations; search defaults to Assets. Ignored for bundle assignment inspection.
labelslist[str] | None—Exact labels; set replaces, empty set clears.
label_targetslist[AssetLabelTarget] | None—Common-operation batch; each mutation row requires revision.
label_revisionstr | None—Opaque revision from get_labels for a single-target mutation.
await_graph_secondsfloat | None—Asset writes only: wait 0..30 seconds for the existing active graph receipt and first diff page; never activates a graph.
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​

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"
}