Back to Unity Mcp

import_model

website/docs/reference/tools/asset_gen/import_model.md

10.0.02.3 KB
Original Source

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

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.
  • 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 | NoneSearch query for the search action.
categoriesstr | NoneFilter search by category.
downloadablebool | NoneRestrict search to downloadable models.
countint | NoneMaximum number of search results.
cursorstr | NonePagination cursor for search.
uidstr | NoneSketchfab model uid for preview/import.
target_sizefloat | NoneNormalize the largest dimension to this size (meters).
namestr | NoneBase name for the imported asset.
output_folderstr | NoneDestination folder under Assets/ for the import.
job_idstr | NoneJob id for status/cancel.

Returns

A dict containing the Unity response. The exact shape depends on the action.

Examples

<!-- examples:start -->

No examples yet. Add usage examples here — they will be preserved across regenerations.

<!-- examples:end -->