Skip to main content

asset_inspect

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.registry.capability_adapter

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

Description​

Search assets or inspect their metadata and components.

Parameters​

NameTypeRequiredDescription
actionLiteral['search', 'get_info', 'get_components']yesFeature action to perform.
pathstr | None—Asset path required for asset operations; search defaults to Assets. Ignored for bundle assignment inspection.
asset_typestr | None—Asset type (e.g., 'Material', 'Folder') - required for 'create'. Note: For ScriptableObjects, use manage_scriptable_object.
generate_previewbool—Generate previews up to 256 pixels per edge and 256 KiB PNG each; search allows at most 32 results and 4 MiB aggregate base64.
search_patternstr | None—Search pattern (e.g., '*.prefab' or AssetDatabase filters like 't:MonoScript'). Recommended: put queries like 't:MonoScript' here and set path='Assets'.
filter_typestr | None—Filter type for search
filter_date_afterstr | None—Date after which to filter
page_sizeint | str | None—Page size: search 1-1000 (default 50), previews 1-32 (default 32), bundle inspection 1-100 (default 50).
page_numberint | str | None—Page number for pagination (1-based).
metadata_onlybool—Search only: return metadata with instanceID=0 and a bounded 60-second Editor-session snapshot; no explicit object/preview loads. Default false preserves legacy behavior.
search_snapshotstr | None—Search only: opaque token from metadata_only=true; repeat the effective query and page_size.
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​

Find the first 20 C# script assets under Assets/Scripts without loading previews. If the response includes a search snapshot, reuse it with the same query and page size for subsequent pages.

MCP arguments
{
"action": "search",
"path": "Assets/Scripts",
"search_pattern": "t:MonoScript",
"metadata_only": true,
"page_size": 20,
"page_number": 1
}