Skip to main content

import_model

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: asset_gen  ·  Module: services.tools.import_model

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

Description​

Import 3D models from the Sketchfab marketplace into the Unity project. Bring-your-own-key: the Sketchfab token lives in the editor's secure store and never crosses the bridge.

ACTIONS:

  • search: Search Sketchfab. Params: query, categories, downloadable, count, cursor -> results with model uids.
  • preview: Fetch model metadata (name, thumbnail URLs, license, vertex/face counts) for a uid before import.
  • import: Download + import a model by uid. Returns { job_id } immediately; poll with the status action. Params: uid, target_size, name, output_folder, archive_model_path. archive_model_path selects an exact case-sensitive relative ZIP entry; omission prefers FBX/OBJ then GLB/glTF with ordinal path ordering. At most 1024 model candidates, 512 UTF-8 bytes per path and 32 segments. Status archive_selection reports candidates, chosen paths and extraction state; failed selection/import retains evidence and never falls back to another model. target_size applies only when Auto-Normalize Imported Models is enabled; finite zero or negative values preserve imported scale. Successful normalization of a model without ModelImporter may return a prefab variant while retaining its source model.
  • status: Poll an async import job by job_id -> { state, progress, assetPath?, error? }.
  • cancel: Cancel an in-flight import by job_id.
  • list_providers: List configured marketplace providers (no key values).

Parameters​

NameTypeRequiredDescription
actionLiteral['search', 'preview', 'import', 'status', 'cancel', 'list_providers']yesAction to perform.
querystr | None—Search query for the search action.
categoriesstr | None—Filter search by category.
downloadablebool | None—Restrict search to downloadable models.
countint | None—Maximum number of search results.
cursorstr | None—Pagination cursor for search.
uidstr | None—Sketchfab model uid for preview/import.
target_sizefloat | None—Largest default-pose mesh-bounds dimension in meters when Auto-Normalize Imported Models is enabled; finite zero/negative values preserve scale. Omitted defaults to 1. Normalized glTF may return a prefab variant.
namestr | None—Base name for the imported asset.
output_folderstr | None—Destination folder under Assets/ for the import.
job_idstr | None—Job id for status/cancel.
archive_model_pathstr | None—Import only: exact case-sensitive relative ZIP model entry. Omit for deterministic FBX/OBJ-first selection; no basename search or fallback. At most 512 UTF-8 bytes and 32 segments.
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​

List available model providers before choosing where to search for a model.

MCP arguments
{
"action": "list_providers"
}