chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:49:17 +08:00
commit 7243d5823b
2201 changed files with 257291 additions and 0 deletions
@@ -0,0 +1,8 @@
{
"label": "animation",
"link": {
"type": "doc",
"id": "reference/tools/animation/index"
},
"collapsed": true
}
@@ -0,0 +1,11 @@
---
title: "animation tools"
sidebar_label: "animation"
description: "MCP for Unity tools in the animation group."
---
# `animation` tools
Animator control & AnimationClip creation
- **[`manage_animation`](./manage_animation.md)** — Manage Unity animation: Animator control and AnimationClip creation.
@@ -0,0 +1,37 @@
---
title: manage_animation
sidebar_label: manage_animation
description: "Manage Unity animation: Animator control and AnimationClip creation."
---
# `manage_animation`
> **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:** `animation` &nbsp;·&nbsp; **Module:** `services.tools.manage_animation`
## Description
Manage Unity animation: Animator control and AnimationClip creation. Action prefixes: animator_* (play, crossfade, set parameters, get info), controller_* (create AnimatorControllers, add states/transitions/parameters), clip_* (create clips, add keyframe curves, assign to GameObjects). Action-specific parameters go in `properties` (keys match ManageAnimation.cs).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | Action to perform (prefix: animator_, controller_, clip_). |
| `target` | `str \| None` | — | Target GameObject (name/path/id). |
| `search_method` | `Literal['by_id', 'by_name', 'by_path', 'by_tag', 'by_layer'] \| None` | — | How to find the target GameObject. |
| `clip_path` | `str \| None` | — | Asset path for AnimationClip (e.g. 'Assets/Animations/Walk.anim'). |
| `controller_path` | `str \| None` | — | Asset path for AnimatorController (e.g. 'Assets/Animators/Player.controller'). |
| `properties` | `dict[str, Any] \| str \| None` | — | Action-specific parameters (dict or JSON string). |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "asset_gen",
"link": {
"type": "doc",
"id": "reference/tools/asset_gen/index"
},
"collapsed": true
}
@@ -0,0 +1,51 @@
---
title: generate_image
sidebar_label: generate_image
description: "Generate 2D images with AI providers (fal.ai, OpenRouter) and import them as textures/sprites into the Unity project."
---
# `generate_image`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.generate_image`
## Description
Generate 2D images with AI providers (fal.ai, OpenRouter) and import them as textures/sprites into the Unity project. Bring-your-own-key: provider keys live in the editor's secure store and never cross the bridge.
ACTIONS:
- generate: Submit an image job (text->image or image->image). Returns { job_id }; poll with the status action. Params: provider, mode (text|image), prompt, image_path|image_url, model, transparent, width, height, name, output_folder.
- remove_background: Unsupported in this version; returns an error instead of a job_id.
- status: Poll an async job by job_id -> { state, progress, assetPath?, error? }.
- cancel: Cancel an in-flight job by job_id.
- list_providers: List configured image providers and capabilities (no key values).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['generate', 'remove_background', 'status', 'cancel', 'list_providers']` | yes | Action to perform. |
| `provider` | `str \| None` | — | Provider id (fal, openrouter). |
| `mode` | `str \| None` | — | Generation mode: text or image. |
| `prompt` | `str \| None` | — | Text prompt for text->image. |
| `image_path` | `str \| None` | — | Path to a source image for image->image mode. |
| `image_url` | `str \| None` | — | URL of a source image for image->image. |
| `model` | `str \| None` | — | Provider model id/slug (e.g. FLUX, gemini-2.5-flash-image). |
| `transparent` | `bool \| None` | — | Mark the imported texture as alpha-is-transparency. NOTE: fal/FLUX and OpenRouter have no generation-time transparency, so this only sets the Unity import flag — it does not make the model render a transparent background. |
| `width` | `int \| None` | — | Output width in pixels. |
| `height` | `int \| None` | — | Output height in pixels. |
| `name` | `str \| None` | — | Base name for the imported asset. |
| `output_folder` | `str \| None` | — | Destination folder under Assets/ for the import. |
| `job_id` | `str \| None` | — | Job 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 -->
@@ -0,0 +1,50 @@
---
title: generate_model
sidebar_label: generate_model
description: "Generate 3D models with AI providers (Tripo, Meshy) and import them into the Unity project."
---
# `generate_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` &nbsp;·&nbsp; **Module:** `services.tools.generate_model`
## Description
Generate 3D models with AI providers (Tripo, Meshy) and import them into the Unity project. Bring-your-own-key: provider keys live in the editor's secure store and never cross the bridge.
ACTIONS:
- generate: Submit a generation job (text->3D or image->3D). Returns { job_id } immediately; poll with the status action. Params: provider, mode (text|image), prompt, image_path|image_url, format (glb|fbx|obj|usdz), target_size, texture, tier, name, output_folder.
- status: Poll an async job by job_id -> { state, progress, assetPath?, error? }.
- cancel: Cancel an in-flight job by job_id.
- list_providers: List configured 3D providers and capabilities (no key values).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['generate', 'status', 'cancel', 'list_providers']` | yes | Action to perform. |
| `provider` | `str \| None` | — | Provider id (tripo, meshy). |
| `mode` | `str \| None` | — | Generation mode: text or image. |
| `prompt` | `str \| None` | — | Text prompt for text->3D. |
| `image_path` | `str \| None` | — | Path to a source image for image->3D. |
| `image_url` | `str \| None` | — | URL of a source image for image->3D. |
| `format` | `str \| None` | — | Output model format: glb, fbx, obj, or usdz. |
| `target_size` | `float \| None` | — | Normalize the largest dimension to this size (meters). |
| `texture` | `bool \| None` | — | Whether to generate textures for the model. |
| `tier` | `str \| None` | — | Provider quality/cost tier. |
| `name` | `str \| None` | — | Base name for the imported asset. |
| `output_folder` | `str \| None` | — | Destination folder under Assets/ for the import. |
| `job_id` | `str \| None` | — | Job 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 -->
@@ -0,0 +1,50 @@
---
title: import_model
sidebar_label: import_model
description: "Import 3D models from the Sketchfab marketplace into the Unity project."
---
# `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` &nbsp;·&nbsp; **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
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['search', 'preview', 'import', 'status', 'cancel', 'list_providers']` | yes | Action to perform. |
| `query` | `str \| None` | — | Search query for the search action. |
| `categories` | `str \| None` | — | Filter search by category. |
| `downloadable` | `bool \| None` | — | Restrict search to downloadable models. |
| `count` | `int \| None` | — | Maximum number of search results. |
| `cursor` | `str \| None` | — | Pagination cursor for search. |
| `uid` | `str \| None` | — | Sketchfab model uid for preview/import. |
| `target_size` | `float \| None` | — | Normalize the largest dimension to this size (meters). |
| `name` | `str \| None` | — | Base name for the imported asset. |
| `output_folder` | `str \| None` | — | Destination folder under Assets/ for the import. |
| `job_id` | `str \| None` | — | Job 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 -->
@@ -0,0 +1,42 @@
---
title: import_model_file
sidebar_label: import_model_file
description: "Import a local 3D model file that already exists on disk (e.g. an FBX/OBJ/glTF exported from Blender or another DCC tool) into the Unity project."
---
# `import_model_file`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.import_model_file`
## Description
Import a local 3D model file that already exists on disk (e.g. an FBX/OBJ/glTF exported from Blender or another DCC tool) into the Unity project. The file is copied under Assets/ and run through Unity's model-import pipeline (scale-normalize, material settings; glTF requires glTFast). Carries no API keys and no file bytes over the bridge.
Params: source_path (absolute or Assets-relative path to a .fbx/.obj/.glb/.gltf/.zip), name, output_folder (under Assets/), target_size, animation_type. Returns { asset_path, asset_guid }.
animation_type (FBX/OBJ only): pass 'generic' or 'humanoid' for a rigged/animated mesh so Unity surfaces its AnimationClips; omitted or 'none' imports no rig (this is the usual cause of a rigged FBX importing with zero clips); 'legacy' selects Unity's legacy Animation system (rarely needed). glTF/GLB ignore it — glTFast imports animation itself.
For multi-file exports (a text .gltf with an external .bin, or an .obj with a sibling .mtl/textures), zip them and pass the .zip — a bare .gltf/.obj is copied without its sidecars.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `source_path` | `str` | yes | Path to the model file on disk (.fbx/.obj/.glb/.gltf/.zip). |
| `name` | `str \| None` | — | Base name for the imported asset. |
| `output_folder` | `str \| None` | — | Destination folder under Assets/ for the import. |
| `target_size` | `float \| None` | — | Normalize the largest dimension to this size (meters). |
| `animation_type` | `Literal['none', 'generic', 'humanoid', 'legacy'] \| None` | — | FBX/OBJ only: rig/animation import mode. 'generic' or 'humanoid' surface the model's AnimationClips; 'legacy' selects Unity's legacy Animation system (rarely needed); omitted or 'none' imports no rig. Ignored for glTF/GLB. |
## 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 -->
@@ -0,0 +1,14 @@
---
title: "asset_gen tools"
sidebar_label: "asset_gen"
description: "MCP for Unity tools in the asset_gen group."
---
# `asset_gen` tools
AI asset generation 3D model gen/import & 2D image gen (bring-your-own-key)
- **[`generate_image`](./generate_image.md)** — Generate 2D images with AI providers (fal.ai, OpenRouter) and import them as textures/sprites into the Unity project.
- **[`generate_model`](./generate_model.md)** — Generate 3D models with AI providers (Tripo, Meshy) and import them into the Unity project.
- **[`import_model`](./import_model.md)** — Import 3D models from the Sketchfab marketplace into the Unity project.
- **[`import_model_file`](./import_model_file.md)** — Import a local 3D model file that already exists on disk (e.g. an FBX/OBJ/glTF exported from Blender or another DCC tool) into the Unity project.
@@ -0,0 +1,8 @@
{
"label": "core",
"link": {
"type": "doc",
"id": "reference/tools/core/index"
},
"collapsed": true
}
@@ -0,0 +1,47 @@
---
title: apply_text_edits
sidebar_label: apply_text_edits
description: "Apply small text edits to a C# script identified by URI."
---
# `apply_text_edits`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Apply small text edits to a C# script identified by URI.
IMPORTANT: This tool replaces EXACT character positions. Always verify content at target lines/columns BEFORE editing!
RECOMMENDED WORKFLOW:
1. First call resources/read with start_line/line_count to verify exact content
2. Count columns carefully (or use find_in_file to locate patterns)
3. Apply your edit with precise coordinates
4. Consider script_apply_edits with anchors for safer pattern-based replacements
Notes:
- For method/class operations, use script_apply_edits (safer, structured edits)
- For pattern-based replacements, consider anchor operations in script_apply_edits
- Lines, columns are 1-indexed
- Tabs count as 1 column
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `uri` | `str` | yes | URI of the script to edit under Assets/ directory, mcpforunity://path/Assets/... or file://... or Assets/... |
| `edits` | `list[dict[str, Any]]` | yes | List of edits to apply to the script, i.e. a list of {startLine,startCol,endLine,endCol,newText} (1-indexed!) |
| `precondition_sha256` | `str \| None` | — | Optional SHA256 of the script to edit, used to prevent concurrent edits |
| `strict` | `bool \| None` | — | Optional strict flag, used to enforce strict mode |
| `options` | `dict[str, Any] \| None` | — | Optional options, used to pass additional options to the script editor |
## 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 -->
@@ -0,0 +1,100 @@
---
title: batch_execute
sidebar_label: batch_execute
description: "Executes multiple MCP commands in a single batch for dramatically better performance."
---
# `batch_execute`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.batch_execute`
## Description
Executes multiple MCP commands in a single batch for dramatically better performance. STRONGLY RECOMMENDED when creating/modifying multiple objects, adding components to multiple targets, or performing any repetitive operations. Reduces latency and token costs by 10-100x compared to sequential tool calls. The max commands per batch is configurable in the Unity MCP Tools window (default 25, hard max 100). Example: creating 5 cubes → use 1 batch_execute with 5 create commands instead of 5 separate calls.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `commands` | `list[dict[str, Any]]` | yes | List of commands with 'tool' and 'params' keys. |
| `parallel` | `bool \| None` | — | Attempt to run read-only commands in parallel |
| `fail_fast` | `bool \| None` | — | Stop processing after the first failure |
| `max_parallelism` | `int \| None` | — | Hint for the maximum number of parallel workers |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
### Why batch?
A loop of 10 individual `manage_gameobject` calls pays 10 round trips to Unity. `batch_execute` pays one. For multi-object setup, batches are routinely **10100× faster**. Use them whenever the next call doesn't need the previous call's return value.
### Spawn three colored cubes in one round trip
> Create a red, blue, and yellow cube at x = -1, 0, 1.
```json
{
"commands": [
{ "tool": "manage_gameobject", "params": {
"action": "create", "name": "RedCube",
"primitive_type": "Cube", "position": [-1, 0, 0]
}},
{ "tool": "manage_gameobject", "params": {
"action": "create", "name": "BlueCube",
"primitive_type": "Cube", "position": [0, 0, 0]
}},
{ "tool": "manage_gameobject", "params": {
"action": "create", "name": "YellowCube",
"primitive_type": "Cube", "position": [1, 0, 0]
}},
{ "tool": "manage_material", "params": {
"action": "create", "material_path": "Materials/Red.mat",
"shader": "Standard", "properties": { "_Color": [1, 0, 0, 1] }
}},
{ "tool": "manage_material", "params": {
"action": "create", "material_path": "Materials/Blue.mat",
"shader": "Standard", "properties": { "_Color": [0, 0, 1, 1] }
}},
{ "tool": "manage_material", "params": {
"action": "create", "material_path": "Materials/Yellow.mat",
"shader": "Standard", "properties": { "_Color": [1, 1, 0, 1] }
}},
{ "tool": "manage_material", "params": {
"action": "assign_material_to_renderer", "target": "RedCube",
"search_method": "by_name", "material_path": "Materials/Red.mat"
}},
{ "tool": "manage_material", "params": {
"action": "assign_material_to_renderer", "target": "BlueCube",
"search_method": "by_name", "material_path": "Materials/Blue.mat"
}},
{ "tool": "manage_material", "params": {
"action": "assign_material_to_renderer", "target": "YellowCube",
"search_method": "by_name", "material_path": "Materials/Yellow.mat"
}}
]
}
```
### Mix tools freely
A batch can mix any tools, as long as ordering inside the batch doesn't depend on a previous call's *return value*. If you need the response of step N to feed step N+1, split into two batches.
### Stop on first failure vs continue
Set `fail_fast: true` (default) to abort the rest on the first failed step. Pass `fail_fast: false` to attempt every operation and collect per-step results, useful for "best-effort cleanup" patterns.
### Parallel reads
Pass `parallel: true` to let the server run **read-only** commands concurrently. Mutating ops still serialize for safety. Tune with `max_parallelism`.
### Limits
Batch size is configurable in the Unity MCP Tools window (default 25, hard max 100). Past the limit, split into multiple batches — round-trip cost is still amortized.
<!-- examples:end -->
@@ -0,0 +1,35 @@
---
title: create_script
sidebar_label: create_script
description: "Create a new C# script at the given project path."
---
# `create_script`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Create a new C# script at the given project path.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `str` | yes | Path under Assets/ to create the script at, e.g., 'Assets/Scripts/My.cs' |
| `contents` | `str` | yes | Contents of the script to create (plain text C# code). The server handles Base64 encoding. |
| `script_type` | `str \| None` | — | Script type (e.g., 'C#') |
| `namespace` | `str \| None` | — | Namespace for the script |
## 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 -->
@@ -0,0 +1,30 @@
---
title: debug_request_context
sidebar_label: debug_request_context
description: "Return the current FastMCP request context details (client_id, session_id, and meta dump)."
---
# `debug_request_context`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.debug_request_context`
## Description
Return the current FastMCP request context details (client_id, session_id, and meta dump).
## Parameters
_No parameters._
## 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 -->
@@ -0,0 +1,32 @@
---
title: delete_script
sidebar_label: delete_script
description: "Delete a C# script by URI or Assets-relative path."
---
# `delete_script`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Delete a C# script by URI or Assets-relative path.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `uri` | `str` | yes | URI of the script to delete under Assets/ directory, mcpforunity://path/Assets/... or file://... or Assets/... |
## 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 -->
@@ -0,0 +1,33 @@
---
title: execute_custom_tool
sidebar_label: execute_custom_tool
description: "Execute a project-scoped custom tool registered by Unity."
---
# `execute_custom_tool`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.execute_custom_tool`
## Description
Execute a project-scoped custom tool registered by Unity.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `tool_name` | `str` | yes | |
| `parameters` | `dict[str, Any] \| None` | — | |
## 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 -->
@@ -0,0 +1,32 @@
---
title: execute_menu_item
sidebar_label: execute_menu_item
description: "Execute a Unity menu item by path."
---
# `execute_menu_item`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.execute_menu_item`
## Description
Execute a Unity menu item by path.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `menu_path` | `str \| None` | — | Menu path for 'execute' or 'exists' (e.g., 'File/Save Project') |
## 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 -->
@@ -0,0 +1,36 @@
---
title: find_gameobjects
sidebar_label: find_gameobjects
description: "Search for GameObjects in the scene by name, tag, layer, component type, or path."
---
# `find_gameobjects`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.find_gameobjects`
## Description
Search for GameObjects in the scene by name, tag, layer, component type, or path. Returns instance IDs only (paginated). Then use mcpforunity://scene/gameobject/{id} resource for full data, or mcpforunity://scene/gameobject/{id}/components for component details. For CRUD operations (create/modify/delete), use manage_gameobject instead.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `search_term` | `str` | yes | |
| `search_method` | `Literal['by_name', 'by_tag', 'by_layer', 'by_component', 'by_path', 'by_id']` | — | |
| `include_inactive` | `bool \| str \| None` | — | |
| `page_size` | `int \| str \| None` | — | |
| `cursor` | `int \| str \| None` | — | |
## 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 -->
@@ -0,0 +1,36 @@
---
title: find_in_file
sidebar_label: find_in_file
description: "Searches a file with a regex pattern and returns line numbers and excerpts."
---
# `find_in_file`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.find_in_file`
## Description
Searches a file with a regex pattern and returns line numbers and excerpts.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `uri` | `str` | yes | The resource URI to search under Assets/ or file path form supported by read_resource |
| `pattern` | `str` | yes | The regex pattern to search for |
| `project_root` | `str \| None` | — | Optional project root path |
| `max_results` | `int` | — | Cap results to avoid huge payloads |
| `ignore_case` | `bool \| str \| None` | — | Case insensitive search |
## 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 -->
@@ -0,0 +1,32 @@
---
title: get_sha
sidebar_label: get_sha
description: "Get SHA256 and basic metadata for a Unity C# script without returning file contents."
---
# `get_sha`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Get SHA256 and basic metadata for a Unity C# script without returning file contents. Requires uri (script path under Assets/ or mcpforunity://path/Assets/... or file://...).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `uri` | `str` | yes | URI of the script to edit under Assets/ directory, mcpforunity://path/Assets/... or file://... or Assets/... |
## 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 -->
@@ -0,0 +1,40 @@
---
title: "core tools"
sidebar_label: "core"
description: "MCP for Unity tools in the core group."
---
# `core` tools
Essential scene, script, asset & editor tools (always on by default)
- **[`apply_text_edits`](./apply_text_edits.md)** — Apply small text edits to a C# script identified by URI.
- **[`batch_execute`](./batch_execute.md)** — Executes multiple MCP commands in a single batch for dramatically better performance.
- **[`create_script`](./create_script.md)** — Create a new C# script at the given project path.
- **[`debug_request_context`](./debug_request_context.md)** — Return the current FastMCP request context details (client_id, session_id, and meta dump).
- **[`delete_script`](./delete_script.md)** — Delete a C# script by URI or Assets-relative path.
- **[`execute_custom_tool`](./execute_custom_tool.md)** — Execute a project-scoped custom tool registered by Unity.
- **[`execute_menu_item`](./execute_menu_item.md)** — Execute a Unity menu item by path.
- **[`find_gameobjects`](./find_gameobjects.md)** — Search for GameObjects in the scene by name, tag, layer, component type, or path.
- **[`find_in_file`](./find_in_file.md)** — Searches a file with a regex pattern and returns line numbers and excerpts.
- **[`get_sha`](./get_sha.md)** — Get SHA256 and basic metadata for a Unity C# script without returning file contents.
- **[`manage_asset`](./manage_asset.md)** — Performs asset operations (import, create, modify, delete, etc.) in Unity.
- **[`manage_build`](./manage_build.md)** — Manage Unity player builds — trigger builds, switch platforms, configure settings, manage build scenes and profiles, run batch builds across platforms.
- **[`manage_camera`](./manage_camera.md)** — Manage cameras (Unity Camera + Cinemachine).
- **[`manage_components`](./manage_components.md)** — Add, remove, or set properties on components attached to GameObjects.
- **[`manage_editor`](./manage_editor.md)** — Controls and queries the Unity editor's state and settings.
- **[`manage_gameobject`](./manage_gameobject.md)** — Performs CRUD operations on GameObjects.
- **[`manage_graphics`](./manage_graphics.md)** — Manage rendering graphics: volumes, post-processing, light baking, rendering stats, pipeline settings, and URP renderer features.
- **[`manage_material`](./manage_material.md)** — Manages Unity materials (set properties, colors, shaders, etc).
- **[`manage_packages`](./manage_packages.md)** — Manage Unity packages: query, install, remove, embed, and configure registries.
- **[`manage_physics`](./manage_physics.md)** — Manage physics settings, collision matrix, materials, joints, queries, and validation.
- **[`manage_prefabs`](./manage_prefabs.md)** — Manages Unity Prefab assets.
- **[`manage_scene`](./manage_scene.md)** — Performs CRUD operations on Unity scenes.
- **[`manage_script`](./manage_script.md)** — Compatibility router for legacy script operations.
- **[`manage_script_capabilities`](./manage_script_capabilities.md)** — Get manage_script capabilities (supported ops, limits, and guards).
- **[`manage_tools`](./manage_tools.md)** — Manage which tool groups are visible in this session.
- **[`read_console`](./read_console.md)** — Gets messages from or clears the Unity Editor console.
- **[`refresh_unity`](./refresh_unity.md)** — Request a Unity asset database refresh and optionally a script compilation.
- **[`script_apply_edits`](./script_apply_edits.md)** — Structured C# edits (methods/classes) with safer boundaries - prefer this over raw text.
- **[`set_active_instance`](./set_active_instance.md)** — Set the active Unity instance for this client/session.
- **[`validate_script`](./validate_script.md)** — Validate a C# script and return diagnostics.
@@ -0,0 +1,44 @@
---
title: manage_asset
sidebar_label: manage_asset
description: "Performs asset operations (import, create, modify, delete, etc.) in Unity."
---
# `manage_asset`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_asset`
## Description
Performs asset operations (import, create, modify, delete, etc.) in Unity.
Tip (payload safety): for `action="search"`, prefer paging (`page_size`, `page_number`) and keep `generate_preview=false` (previews can add large base64 blobs).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['import', 'create', 'modify', 'delete', 'duplicate', 'move', 'rename', 'search', 'get_info', 'create_folder', 'get_components']` | yes | Perform CRUD operations on assets. |
| `path` | `str` | yes | Asset path (e.g., 'Materials/MyMaterial.mat') or search scope (e.g., 'Assets'). |
| `asset_type` | `str \| None` | — | Asset type (e.g., 'Material', 'Folder') - required for 'create'. Note: For ScriptableObjects, use manage_scriptable_object. |
| `properties` | `dict[str, Any] \| str \| None` | — | Dictionary of properties for 'create'/'modify'. Keys are property names, values are property values. |
| `destination` | `str \| None` | — | Target path for 'duplicate'/'move'. |
| `generate_preview` | `bool` | — | Generate a preview/thumbnail for the asset when supported. Warning: previews may include large base64 payloads; keep false unless needed. |
| `search_pattern` | `str \| None` | — | Search pattern (e.g., '*.prefab' or AssetDatabase filters like 't:MonoScript'). Recommended: put queries like 't:MonoScript' here and set path='Assets'. |
| `filter_type` | `str \| None` | — | Filter type for search |
| `filter_date_after` | `str \| None` | — | Date after which to filter |
| `page_size` | `int \| float \| str \| None` | — | Page size for pagination. Recommended: 25 (smaller for LLM-friendly responses). |
| `page_number` | `int \| float \| str \| None` | — | Page number for pagination (1-based). |
## 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 -->
@@ -0,0 +1,47 @@
---
title: manage_build
sidebar_label: manage_build
description: "Manage Unity player builds — trigger builds, switch platforms, configure settings, manage build scenes and profiles, run batch builds across platforms."
---
# `manage_build`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_build`
## Description
Manage Unity player builds — trigger builds, switch platforms, configure settings, manage build scenes and profiles, run batch builds across platforms. Actions: build, status, platform, settings, scenes, profiles, batch, cancel.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | Action: build, status, platform, settings, scenes, profiles, batch, cancel |
| `target` | `str \| None` | — | Build target: windows64, osx, linux64, android, ios, webgl, uwp, tvos, visionos |
| `output_path` | `str \| None` | — | Output path for the build |
| `scenes` | `str \| None` | — | JSON array of scene paths, or comma-separated paths |
| `development` | `str \| None` | — | Development build (true/false) |
| `options` | `str \| None` | — | JSON array of BuildOptions: clean_build, auto_run, deep_profiling, compress_lz4, strict_mode, detailed_report |
| `subtarget` | `str \| None` | — | Build subtarget: player or server |
| `scripting_backend` | `str \| None` | — | Scripting backend: mono or il2cpp (persistent change) |
| `profile` | `str \| None` | — | Build Profile asset path (Unity 6+ only) |
| `property` | `str \| None` | — | Settings property: product_name, company_name, version, bundle_id, scripting_backend, defines, architecture |
| `value` | `str \| None` | — | Value to set for the property (omit to read) |
| `activate` | `str \| None` | — | Activate a build profile (true/false) |
| `targets` | `str \| None` | — | JSON array of targets for batch build |
| `profiles` | `str \| None` | — | JSON array of profile paths for batch build (Unity 6+) |
| `output_dir` | `str \| None` | — | Base output directory for batch builds |
| `job_id` | `str \| None` | — | Job 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 -->
@@ -0,0 +1,80 @@
---
title: manage_camera
sidebar_label: manage_camera
description: "Manage cameras (Unity Camera + Cinemachine)."
---
# `manage_camera`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_camera`
## Description
Manage cameras (Unity Camera + Cinemachine). Works without Cinemachine using basic Camera; unlocks presets, pipelines, and blending when Cinemachine is installed. Use ping to check Cinemachine availability.
SETUP:
- ping: Check if Cinemachine is available
- ensure_brain: Ensure CinemachineBrain exists on main camera
- get_brain_status: Get Brain state (active camera, blend, etc.)
CAMERA CREATION:
- create_camera: Create camera with preset (third_person, freelook, follow, dolly, static, top_down, side_scroller). Falls back to basic Camera without Cinemachine.
CAMERA CONFIGURATION:
- set_target: Set Follow and/or LookAt targets on a camera
- set_priority: Set camera priority for Brain selection
- set_lens: Configure lens (fieldOfView, nearClipPlane, farClipPlane, orthographicSize, dutch)
- set_body: Configure Body component (bodyType to swap, plus component properties)
- set_aim: Configure Aim component (aimType to swap, plus component properties)
- set_noise: Configure Noise component (amplitudeGain, frequencyGain)
EXTENSIONS:
- add_extension: Add extension (extensionType: CinemachineConfiner2D, CinemachineDeoccluder, CinemachineImpulseListener, CinemachineFollowZoom, CinemachineRecomposer, etc.)
- remove_extension: Remove extension by type
CAMERA CONTROL:
- set_blend: Configure default blend (style: Cut/EaseInOut/Linear/etc., duration)
- force_camera: Override Brain to use specific camera
- release_override: Release camera override
- list_cameras: List all cameras with status
CAPTURE:
- screenshot: Capture a screenshot. By default (no camera specified) uses ScreenCapture API, which captures all render layers including Screen Space - Overlay UI canvases. Specifying a camera uses direct camera rendering, which EXCLUDES Screen Space - Overlay canvases (use only when you need a specific viewpoint without UI). Supports include_image=true for inline base64 PNG, batch='surround' for 6-angle contact sheet, batch='orbit' for configurable grid, view_target/view_position for positioned capture, and capture_source='scene_view' to capture the active Unity Scene View viewport.
- screenshot_multiview: Shorthand for screenshot with batch='surround' and include_image=true.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The camera action to perform. |
| `target` | `str \| None` | — | Target camera (name, path, or instance ID). |
| `search_method` | `Literal['by_id', 'by_name', 'by_path'] \| None` | — | How to find target. |
| `properties` | `dict[str, Any] \| str \| None` | — | Action-specific parameters (dict or JSON string). |
| `screenshot_file_name` | `str \| None` | — | Screenshot file name (optional). Defaults to timestamp. |
| `screenshot_super_size` | `int \| str \| None` | — | Screenshot supersize multiplier (integer >= 1). |
| `camera` | `str \| None` | — | Camera to capture from (name, path, or instance ID). Omit to use ScreenCapture API (captures all layers including Screen Space Overlay UI). Specify only when you need a particular camera viewpoint; note that Screen Space - Overlay canvases will NOT appear in camera-rendered captures. |
| `include_image` | `bool \| str \| None` | — | If true, return screenshot as inline base64 PNG. Default false. |
| `max_resolution` | `int \| str \| None` | — | Max resolution (longest edge px) for inline image. Default 640. |
| `capture_source` | `Literal['game_view', 'scene_view'] \| None` | — | Screenshot source. 'game_view' (default) captures the game/camera path; 'scene_view' captures the active Unity Scene View viewport. |
| `batch` | `str \| None` | — | Batch capture mode: 'surround' (6 angles) or 'orbit' (configurable grid). |
| `view_target` | `str \| int \| list[float] \| None` | — | Target to focus on. GameObject name/path/ID or [x,y,z]. For game_view: aims camera at target. For scene_view: frames the Scene View on the target. |
| `view_position` | `list[float] \| str \| None` | — | World position [x,y,z] to place camera for positioned capture. |
| `view_rotation` | `list[float] \| str \| None` | — | Euler rotation [x,y,z] for camera. Overrides view_target if both provided. |
| `orbit_angles` | `int \| str \| None` | — | Number of azimuth samples for batch='orbit' (default 8, max 36). |
| `orbit_elevations` | `list[float] \| str \| None` | — | Elevation angles in degrees for batch='orbit' (default [0, 30, -15]). |
| `orbit_distance` | `float \| str \| None` | — | Camera distance from target for batch='orbit' (default auto). |
| `orbit_fov` | `float \| str \| None` | — | Camera FOV in degrees for batch='orbit' (default 60). |
| `output_folder` | `str \| None` | — | Optional folder for screenshot output. Project-relative (e.g. 'Assets/Screenshots' or 'Captures') or absolute path inside the project. Overrides the user's Editor preference. If omitted, falls back to the Editor preference, then to the built-in default (Assets/Screenshots). |
## 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 -->
@@ -0,0 +1,39 @@
---
title: manage_components
sidebar_label: manage_components
description: "Add, remove, or set properties on components attached to GameObjects."
---
# `manage_components`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_components`
## Description
Add, remove, or set properties on components attached to GameObjects. Actions: add, remove, set_property. Requires target (instance ID or name) and component_type. For READING component data, use the mcpforunity://scene/gameobject/{id}/components resource or mcpforunity://scene/gameobject/{id}/component/{name} for a single component. For creating/deleting GameObjects themselves, use manage_gameobject instead.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['add', 'remove', 'set_property']` | yes | Action to perform: add (add component), remove (remove component), set_property (set component property) |
| `target` | `str \| int` | yes | Target GameObject - instance ID (preferred) or name/path |
| `component_type` | `str` | yes | Component type name (e.g., 'Rigidbody', 'BoxCollider', 'MyScript') |
| `search_method` | `Literal['by_id', 'by_name', 'by_path'] \| None` | — | How to find the target GameObject |
| `property` | `str \| None` | — | Property name to set (for set_property action) |
| `value` | `str \| int \| float \| bool \| dict[Any] \| list[Any] \| None` | — | Value to set (for set_property action). For object references: instance ID (int), asset path (string), or {"guid": "..."} / {"path": "..."}. For Sprite sub-assets: {"guid": "...", "spriteName": "<name>"} or {"guid": "...", "fileID": <id>}. Single-sprite textures auto-resolve. |
| `properties` | `dict[str, Any] \| str \| None` | — | Dictionary of property names to values. Example: {"mass": 5.0, "useGravity": false} |
| `component_index` | `int \| None` | — | Zero-based index to select which component when multiple of the same type exist. Use the components resource to discover indices. If omitted, targets the first instance. |
## 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 -->
@@ -0,0 +1,35 @@
---
title: manage_editor
sidebar_label: manage_editor
description: "Controls and queries the Unity editor's state and settings."
---
# `manage_editor`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_editor`
## Description
Controls and queries the Unity editor's state and settings. Read-only actions: telemetry_status, telemetry_ping. Modifying actions: play, pause, stop, set_active_tool, add_tag, remove_tag, add_layer, remove_layer, deploy_package, restore_package, undo, redo. For prefab editing (open/save/close prefab stage), use manage_prefabs. deploy_package copies the configured MCPForUnity source folder into the project's installed package location (triggers recompile, no confirmation dialog). restore_package reverts to the pre-deployment backup. undo/redo perform Unity editor undo/redo and return the affected group name.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['telemetry_status', 'telemetry_ping', 'play', 'pause', 'stop', 'set_active_tool', 'add_tag', 'remove_tag', 'add_layer', 'remove_layer', 'deploy_package', 'restore_package', 'undo', 'redo']` | yes | Get and update the Unity Editor state. deploy_package copies the configured MCPForUnity source into the project's package location (triggers recompile). restore_package reverts the last deployment from backup. undo/redo perform editor undo/redo. For prefab editing (open/save/close prefab stage), use manage_prefabs. |
| `tool_name` | `str \| None` | — | Tool name when setting active tool |
| `tag_name` | `str \| None` | — | Tag name when adding and removing tags |
| `layer_name` | `str \| None` | — | Layer name when adding and removing layers |
## 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 -->
@@ -0,0 +1,126 @@
---
title: manage_gameobject
sidebar_label: manage_gameobject
description: "Performs CRUD operations on GameObjects."
---
# `manage_gameobject`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_gameobject`
## Description
Performs CRUD operations on GameObjects. Actions: create, modify, delete, duplicate, move_relative, look_at. NOT for searching — use the find_gameobjects tool to search by name/tag/layer/component/path. NOT for component management — use the manage_components tool (add/remove/set_property) or mcpforunity://scene/gameobject/{id}/components resource (read).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'modify', 'delete', 'duplicate', 'move_relative', 'look_at'] \| None` | — | Action to perform on GameObject. |
| `target` | `str \| None` | — | GameObject identifier by name, path, or instance ID for modify/delete/duplicate actions |
| `search_method` | `Literal['by_id', 'by_name', 'by_path', 'by_tag', 'by_layer', 'by_component'] \| None` | — | How to resolve 'target'. If omitted, Unity infers: instance ID -> by_id, path (contains '/') -> by_path, otherwise by_name. |
| `name` | `str \| None` | — | GameObject name for 'create' (initial name) and 'modify' (rename) actions. |
| `tag` | `str \| None` | — | Tag name - used for both 'create' (initial tag) and 'modify' (change tag) |
| `parent` | `str \| None` | — | Parent GameObject reference - used for both 'create' (initial parent) and 'modify' (change parent) |
| `position` | `list[float] \| dict[str, float] \| str \| None` | — | Position as [x, y, z] array, {x, y, z} object, or JSON string |
| `rotation` | `list[float] \| dict[str, float] \| str \| None` | — | Rotation as [x, y, z] euler angles array, {x, y, z} object, or JSON string |
| `scale` | `list[float] \| dict[str, float] \| str \| None` | — | Scale as [x, y, z] array, {x, y, z} object, or JSON string |
| `components_to_add` | `list[str] \| str \| None` | — | List of component names to add during 'create' or 'modify' |
| `primitive_type` | `str \| None` | — | Primitive type for 'create' action |
| `save_as_prefab` | `bool \| str \| None` | — | If True, saves the created GameObject as a prefab (accepts true/false or 'true'/'false') |
| `prefab_path` | `str \| None` | — | Path for prefab creation |
| `prefab_folder` | `str \| None` | — | Folder for prefab creation |
| `set_active` | `bool \| str \| None` | — | If True, sets the GameObject active (accepts true/false or 'true'/'false') |
| `layer` | `str \| None` | — | Layer name |
| `is_static` | `bool \| str \| None` | — | Set the GameObject's static flag. true = all StaticEditorFlags, false = none (accepts true/false or 'true'/'false') |
| `components_to_remove` | `list[str] \| str \| None` | — | List of component names to remove |
| `component_properties` | `dict[str, dict[str, Any]] \| str \| None` | — | Dictionary of component names to their properties to set. For example: `{"MyScript": {"otherObject": {"find": "Player", "method": "by_name"}}}` assigns GameObject `{"MyScript": {"playerHealth": {"find": "Player", "component": "HealthComponent"}}}` assigns Component Example set nested property: - Access shared material: `{"MeshRenderer": {"sharedMaterial.color": [1, 0, 0, 1]}}` |
| `new_name` | `str \| None` | — | New name for the duplicated object (default: SourceName_Copy) |
| `offset` | `list[float] \| str \| None` | — | Offset from original/reference position as [x, y, z] array (list or JSON string) |
| `reference_object` | `str \| None` | — | Reference object for relative movement (required for move_relative) |
| `direction` | `Literal['left', 'right', 'up', 'down', 'forward', 'back', 'front', 'backward', 'behind'] \| None` | — | Direction for relative movement (e.g., 'right', 'up', 'forward') |
| `distance` | `float \| None` | — | Distance to move in the specified direction (default: 1.0) |
| `world_space` | `bool \| str \| None` | — | If True (default), use world space directions; if False, use reference object's local directions |
| `look_at_target` | `list[float] \| str \| None` | — | World position [x,y,z] or GameObject name/path/ID to look at (for look_at action). |
| `look_at_up` | `list[float] \| str \| None` | — | Optional up vector [x,y,z] for look_at. Defaults to [0,1,0]. |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
### Create a red cube at the world origin
> Create a cube called `RedCube` at (0, 0, 0).
```json
{
"action": "create",
"name": "RedCube",
"primitive_type": "Cube",
"position": [0, 0, 0]
}
```
Pair with [`manage_material`](./manage_material) to make it actually red.
### Find a GameObject by name and move it
> Move the `Player` 5 units up.
```json
{
"action": "modify",
"target": "Player",
"search_method": "by_name",
"position": [0, 5, 0]
}
```
`search_method: by_name` matches the first GameObject whose name equals `Player`. Use `by_path` for `Parent/Child/Leaf` lookups or `by_id` for instance IDs.
### Parent one GameObject under another
> Make `Sword` a child of `Player/RightHand`.
```json
{
"action": "modify",
"target": "Sword",
"search_method": "by_name",
"parent": "Player/RightHand"
}
```
### Delete every GameObject tagged `Cleanup`
> Delete all objects tagged `Cleanup` in the current scene.
```json
{
"action": "delete",
"target": "Cleanup",
"search_method": "by_tag"
}
```
### Multi-instance routing
> In the `Editor2` instance, duplicate `MainCamera`.
```json
{
"action": "duplicate",
"target": "MainCamera",
"search_method": "by_name",
"unity_instance": "Editor2"
}
```
See [Multi-Instance Routing](/guides/multi-instance) for the full routing model.
<!-- examples:end -->
@@ -0,0 +1,101 @@
---
title: manage_graphics
sidebar_label: manage_graphics
description: "Manage rendering graphics: volumes, post-processing, light baking, rendering stats, pipeline settings, and URP renderer features."
---
# `manage_graphics`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_graphics`
## Description
Manage rendering graphics: volumes, post-processing, light baking, rendering stats, pipeline settings, and URP renderer features. Use ping to check pipeline and available features.
VOLUME (require URP/HDRP):
- volume_create, volume_add_effect, volume_set_effect, volume_remove_effect
- volume_get_info, volume_set_properties, volume_list_effects, volume_create_profile
BAKE (Edit mode only):
- bake_start, bake_cancel, bake_status, bake_clear, bake_reflection_probe
- bake_get_settings, bake_set_settings
- bake_create_light_probe_group, bake_create_reflection_probe, bake_set_probe_positions
STATS:
- stats_get: Rendering counters (draw calls, batches, triangles, etc.)
- stats_list_counters, stats_set_scene_debug, stats_get_memory
PIPELINE:
- pipeline_get_info, pipeline_set_quality, pipeline_get_settings, pipeline_set_settings
FEATURES (URP only):
- feature_list, feature_add, feature_remove, feature_configure, feature_toggle, feature_reorder
SKYBOX / ENVIRONMENT:
- skybox_get: Read all environment settings (material, ambient, fog, reflection, sun)
- skybox_set_material: Set skybox material by asset path
- skybox_set_properties: Set properties on current skybox material (tint, exposure, rotation)
- skybox_set_ambient: Set ambient lighting mode and colors
- skybox_set_fog: Enable/configure fog (mode, color, density, start/end distance)
- skybox_set_reflection: Set environment reflection settings
- skybox_set_sun: Set the sun source light
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The graphics action to perform. |
| `target` | `str \| None` | — | Target object name or instance ID. |
| `effect` | `str \| None` | — | Effect type name (e.g., 'Bloom', 'Vignette'). |
| `parameters` | `dict[str, Any] \| None` | — | Dict of parameter values. |
| `properties` | `dict[str, Any] \| None` | — | Dict of properties to set. |
| `settings` | `dict[str, Any] \| None` | — | Dict of settings (bake/pipeline). |
| `name` | `str \| None` | — | Name for created objects. |
| `is_global` | `bool \| None` | — | Whether Volume is global (default true). |
| `weight` | `float \| None` | — | Volume weight (0-1). |
| `priority` | `float \| None` | — | Volume priority. |
| `profile_path` | `str \| None` | — | Asset path for VolumeProfile. |
| `effects` | `list[dict[str, Any]] \| None` | — | Effect definitions for volume_create. |
| `path` | `str \| None` | — | Asset path for volume_create_profile. |
| `level` | `str \| None` | — | Quality level name or index. |
| `position` | `list[float] \| None` | — | Position [x,y,z]. |
| `grid_size` | `list[int] \| None` | — | Probe grid size [x,y,z]. |
| `spacing` | `float \| None` | — | Probe grid spacing. |
| `size` | `list[float] \| None` | — | Probe/volume size [x,y,z]. |
| `resolution` | `int \| None` | — | Probe resolution. |
| `mode` | `str \| None` | — | Probe mode or debug mode. |
| `hdr` | `bool \| None` | — | HDR for reflection probes. |
| `box_projection` | `bool \| None` | — | Box projection for reflection probes. |
| `positions` | `list[list[float]] \| None` | — | Probe positions array. |
| `index` | `int \| None` | — | Feature index. |
| `active` | `bool \| None` | — | Feature active state. |
| `order` | `list[int] \| None` | — | Feature reorder indices. |
| `async_bake` | `bool \| None` | — | Async bake (default true). |
| `feature_type` | `str \| None` | — | Renderer feature type name. |
| `material` | `str \| None` | — | Material asset path for feature. |
| `color` | `list[float] \| None` | — | Color [r,g,b,a] for ambient/fog. |
| `intensity` | `float \| None` | — | Intensity value (ambient/reflection). |
| `ambient_mode` | `str \| None` | — | Ambient mode: Skybox, Trilight, Flat, Custom. |
| `equator_color` | `list[float] \| None` | — | Equator color [r,g,b,a] (Trilight mode). |
| `ground_color` | `list[float] \| None` | — | Ground color [r,g,b,a] (Trilight mode). |
| `fog_enabled` | `bool \| None` | — | Enable or disable fog. |
| `fog_mode` | `str \| None` | — | Fog mode: Linear, Exponential, ExponentialSquared. |
| `fog_color` | `list[float] \| None` | — | Fog color [r,g,b,a]. |
| `fog_density` | `float \| None` | — | Fog density (Exponential modes). |
| `fog_start` | `float \| None` | — | Fog start distance (Linear mode). |
| `fog_end` | `float \| None` | — | Fog end distance (Linear mode). |
| `bounces` | `int \| None` | — | Reflection bounces. |
| `reflection_mode` | `str \| None` | — | Default reflection mode: Skybox, Custom. |
## 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 -->
@@ -0,0 +1,101 @@
---
title: manage_material
sidebar_label: manage_material
description: "Manages Unity materials (set properties, colors, shaders, etc)."
---
# `manage_material`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_material`
## Description
Manages Unity materials (set properties, colors, shaders, etc). Read-only actions: ping, get_material_info. Modifying actions: create, set_material_shader_property, set_material_color, assign_material_to_renderer, set_renderer_color.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['ping', 'create', 'set_material_shader_property', 'set_material_color', 'assign_material_to_renderer', 'set_renderer_color', 'get_material_info']` | yes | Action to perform. |
| `material_path` | `str \| None` | — | Path to material asset (Assets/...) |
| `property` | `str \| None` | — | Shader property name (e.g., _BaseColor, _MainTex) |
| `shader` | `str \| None` | — | Shader name (default: Standard) |
| `properties` | `dict[str, Any] \| str \| None` | — | Initial properties to set as {name: value} dict. |
| `value` | `list \| float \| int \| str \| bool \| None` | — | Value to set (color array, float, texture path/instruction) |
| `color` | `list[float] \| dict[str, float] \| str \| None` | — | Color as [r, g, b] or [r, g, b, a] array, {r, g, b, a} object, or JSON string. |
| `target` | `str \| None` | — | Target GameObject (name, path, or find instruction) |
| `search_method` | `Literal['by_id', 'by_name', 'by_path', 'by_tag', 'by_layer', 'by_component'] \| None` | — | Search method for target |
| `slot` | `int \| None` | — | Material slot index (0-based) |
| `mode` | `Literal['shared', 'instance', 'property_block', 'create_unique'] \| None` | — | Assignment/modification mode; behavior when omitted is action-specific on the Unity side. |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
### Create a red material from scratch
> Create `Assets/Materials/Red.mat` using the Standard shader, base color red.
```json
{
"action": "create",
"material_path": "Materials/Red.mat",
"shader": "Standard",
"properties": { "_Color": [1, 0, 0, 1] }
}
```
For URP, use `"shader": "Universal Render Pipeline/Lit"` and property `_BaseColor`.
### Assign an existing material to a GameObject
> Apply `Assets/Materials/Red.mat` to the `RedCube`.
```json
{
"action": "assign_material_to_renderer",
"target": "RedCube",
"search_method": "by_name",
"material_path": "Materials/Red.mat",
"slot": 0,
"mode": "shared"
}
```
`mode: shared` reuses the asset. `mode: instance` clones it per-renderer (use sparingly — costs draw call batching).
### Change just one shader property
> Set `_Metallic` on `Materials/Red.mat` to 0.8.
```json
{
"action": "set_material_shader_property",
"material_path": "Materials/Red.mat",
"property": "_Metallic",
"value": 0.8
}
```
### Tint a renderer without touching the shared material
> Tint the cube's MeshRenderer blue using a MaterialPropertyBlock.
```json
{
"action": "set_renderer_color",
"target": "RedCube",
"search_method": "by_name",
"color": [0, 0, 1, 1],
"mode": "property_block"
}
```
`property_block` mode avoids creating a per-instance material clone, preserving batching.
<!-- examples:end -->
@@ -0,0 +1,59 @@
---
title: manage_packages
sidebar_label: manage_packages
description: "Manage Unity packages: query, install, remove, embed, and configure registries."
---
# `manage_packages`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_packages`
## Description
Manage Unity packages: query, install, remove, embed, and configure registries.
QUERY (read-only):
- list_packages: List all installed packages
- search_packages: Search Unity registry by keyword
- get_package_info: Get details about a specific installed package
- ping: Check package manager availability
- status: Poll async job status (job_id required for list/search; optional for add/remove/embed)
INSTALL/REMOVE:
- add_package: Install a package (name, name@version, git URL, or file: path)
- remove_package: Remove a package (checks dependents; use force=true to override)
REGISTRIES:
- list_registries: List all scoped registries
- add_registry: Add a scoped registry (e.g., OpenUPM)
- remove_registry: Remove a scoped registry
UTILITY:
- embed_package: Copy package to local Packages/ for editing
- resolve_packages: Force re-resolution of all packages
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The package action to perform. |
| `package` | `str \| None` | — | Package identifier (name, name@version, git URL, or file: path). |
| `force` | `bool \| None` | — | Force removal even if other packages depend on it. |
| `query` | `str \| None` | — | Search query for search_packages. |
| `job_id` | `str \| None` | — | Job ID for polling status. |
| `name` | `str \| None` | — | Registry name for add_registry/remove_registry. |
| `url` | `str \| None` | — | Registry URL for add_registry. |
| `scopes` | `list[str] \| None` | — | Registry scopes for add_registry. |
## 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 -->
@@ -0,0 +1,94 @@
---
title: manage_physics
sidebar_label: manage_physics
description: "Manage physics settings, collision matrix, materials, joints, queries, and validation."
---
# `manage_physics`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_physics`
## Description
Manage physics settings, collision matrix, materials, joints, queries, and validation.
SETTINGS: ping, get_settings, set_settings
COLLISION MATRIX: get_collision_matrix, set_collision_matrix
MATERIALS: create_physics_material, configure_physics_material, assign_physics_material
JOINTS: add_joint, configure_joint, remove_joint
QUERIES: raycast, raycast_all, linecast, shapecast, overlap
FORCES: apply_force
RIGIDBODY: get_rigidbody, configure_rigidbody
VALIDATION: validate
SIMULATION: simulate_step
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['ping', 'get_settings', 'set_settings', 'get_collision_matrix', 'set_collision_matrix', 'create_physics_material', 'configure_physics_material', 'assign_physics_material', 'add_joint', 'configure_joint', 'remove_joint', 'raycast', 'raycast_all', 'linecast', 'shapecast', 'overlap', 'validate', 'simulate_step', 'apply_force', 'get_rigidbody', 'configure_rigidbody']` | yes | The physics action to perform. |
| `dimension` | `str \| None` | — | Physics dimension: '3d' (default) or '2d'. |
| `settings` | `dict[str, Any] \| None` | — | Key-value settings for set_settings. |
| `layer_a` | `str \| None` | — | Layer name or index for collision matrix. |
| `layer_b` | `str \| None` | — | Layer name or index for collision matrix. |
| `collide` | `bool \| None` | — | Whether layers should collide (set_collision_matrix). |
| `name` | `str \| None` | — | Name for new physics material. |
| `path` | `str \| None` | — | Asset path for materials. |
| `dynamic_friction` | `float \| None` | — | Dynamic friction (0-1). |
| `static_friction` | `float \| None` | — | Static friction (0-1). |
| `bounciness` | `float \| None` | — | Bounciness (0-1). |
| `friction` | `float \| None` | — | Friction for 2D materials. |
| `friction_combine` | `str \| None` | — | Friction combine mode: Average, Minimum, Multiply, Maximum. |
| `bounce_combine` | `str \| None` | — | Bounce combine mode: Average, Minimum, Multiply, Maximum. |
| `material_path` | `str \| None` | — | Path to physics material asset for assign. |
| `target` | `str \| None` | — | Target GameObject name or instance ID. |
| `collider_type` | `str \| None` | — | Specific collider type to target. |
| `search_method` | `str \| None` | — | Search method for target resolution. |
| `joint_type` | `str \| None` | — | Joint type: fixed, hinge, spring, character, configurable (3D); distance, fixed, friction, hinge, relative, slider, spring, target, wheel (2D). |
| `connected_body` | `str \| None` | — | Connected body target for joints. |
| `motor` | `dict[str, Any] \| None` | — | Motor config: {targetVelocity, force, freeSpin}. |
| `limits` | `dict[str, Any] \| None` | — | Limits config: {min, max, bounciness}. |
| `spring` | `dict[str, Any] \| None` | — | Spring config: {spring, damper, targetPosition}. |
| `drive` | `dict[str, Any] \| None` | — | Drive config for ConfigurableJoint. |
| `properties` | `dict[str, Any] \| None` | — | Direct property dict for joints or materials. |
| `origin` | `list[float] \| None` | — | Ray origin [x,y,z] or [x,y]. |
| `direction` | `list[float] \| None` | — | Ray direction [x,y,z] or [x,y]. |
| `max_distance` | `float \| None` | — | Max raycast distance. |
| `layer_mask` | `str \| None` | — | Layer mask for queries (name or int). |
| `query_trigger_interaction` | `str \| None` | — | Trigger interaction: UseGlobal, Ignore, Collide. |
| `shape` | `str \| None` | — | Overlap shape: sphere, box, capsule (3D); circle, box, capsule (2D). |
| `position` | `list[float] \| None` | — | Overlap position [x,y,z] or [x,y]. |
| `size` | `Any \| None` | — | Overlap size: float (radius) or [x,y,z] (half-extents). |
| `start` | `list[float] \| None` | — | Linecast start point [x,y,z] or [x,y]. |
| `end` | `list[float] \| None` | — | Linecast end point [x,y,z] or [x,y]. |
| `point1` | `list[float] \| None` | — | Capsule shapecast point1 [x,y,z]. |
| `point2` | `list[float] \| None` | — | Capsule shapecast point2 [x,y,z]. |
| `height` | `float \| None` | — | Capsule height for shapecast. |
| `capsule_direction` | `int \| None` | — | Capsule direction: 0=X, 1=Y (default), 2=Z. |
| `angle` | `float \| None` | — | Rotation angle for 2D shape casts. |
| `force` | `list[float] \| None` | — | Force vector [x,y,z] or [x,y] for apply_force. |
| `force_mode` | `str \| None` | — | Force mode: Force, Impulse, Acceleration, VelocityChange (3D); Force, Impulse (2D). |
| `force_type` | `str \| None` | — | Force type: 'normal' (default) or 'explosion' (3D only). |
| `torque` | `list[float] \| None` | — | Torque vector [x,y,z] (3D) or [z] (2D). |
| `explosion_position` | `list[float] \| None` | — | Explosion center [x,y,z]. |
| `explosion_radius` | `float \| None` | — | Explosion radius. |
| `explosion_force` | `float \| None` | — | Explosion force magnitude. |
| `upwards_modifier` | `float \| None` | — | Explosion upwards modifier. |
| `steps` | `int \| None` | — | Number of simulation steps (max 100). |
| `step_size` | `float \| None` | — | Step size in seconds. |
| `page_size` | `int \| None` | — | Page size for validate results (default 50). |
| `cursor` | `int \| None` | — | Cursor offset for validate pagination. |
| `component_index` | `int \| None` | — | Zero-based index to select which component when multiple of the same type exist (e.g., multiple HingeJoints or BoxColliders). If omitted, targets the first instance. |
## 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 -->
@@ -0,0 +1,50 @@
---
title: manage_prefabs
sidebar_label: manage_prefabs
description: "Manages Unity Prefab assets."
---
# `manage_prefabs`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_prefabs`
## Description
Manages Unity Prefab assets. Actions: get_info, get_hierarchy, create_from_gameobject, modify_contents, open_prefab_stage, save_prefab_stage, close_prefab_stage. Two approaches to prefab editing: (1) Headless: use modify_contents for automated/scripted edits without opening the prefab in the editor. (2) Interactive: use open_prefab_stage to open a prefab, then manage_gameobject/manage_components to edit objects inside the prefab stage, then save_prefab_stage to save and close_prefab_stage to return to the main scene. Use create_child parameter with modify_contents to add child GameObjects or nested prefab instances to a prefab (single object or array for batch creation in one save). Example: create_child=[{"name": "Child1", "primitive_type": "Sphere", "position": [1,0,0]}, {"name": "Nested", "source_prefab_path": "Assets/Prefabs/Bullet.prefab", "position": [0,2,0]}]. Use delete_child parameter to remove child GameObjects from the prefab (single name/path or array of paths for batch deletion. Example: delete_child=["Child1", "Child2/Grandchild"]). Use component_properties with modify_contents to set serialized fields on existing components (e.g. component_properties={"Rigidbody": {"mass": 5.0}, "MyScript": {"health": 100}}). Supports object references via {"guid": "..."}, {"path": "Assets/..."}, or {"instanceID": 123}. Use manage_asset action=search filterType=Prefab to list prefabs.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create_from_gameobject', 'get_info', 'get_hierarchy', 'modify_contents', 'open_prefab_stage', 'save_prefab_stage', 'close_prefab_stage']` | yes | Prefab operation to perform. |
| `prefab_path` | `str \| None` | — | Prefab asset path (e.g., Assets/Prefabs/MyPrefab.prefab). |
| `target` | `str \| None` | — | Target GameObject: scene object for create_from_gameobject, or object within prefab for modify_contents (name or path like 'Parent/Child'). |
| `allow_overwrite` | `bool \| None` | — | Allow replacing existing prefab. |
| `search_inactive` | `bool \| None` | — | Include inactive GameObjects in search. |
| `unlink_if_instance` | `bool \| None` | — | Unlink from existing prefab before creating new one. |
| `position` | `list[float] \| dict[str, float] \| str \| None` | — | New local position [x, y, z] or {x, y, z} for modify_contents. |
| `rotation` | `list[float] \| dict[str, float] \| str \| None` | — | New local rotation (euler angles) [x, y, z] or {x, y, z} for modify_contents. |
| `scale` | `list[float] \| dict[str, float] \| str \| None` | — | New local scale [x, y, z] or {x, y, z} for modify_contents. |
| `name` | `str \| None` | — | New name for the target object in modify_contents. |
| `tag` | `str \| None` | — | New tag for the target object in modify_contents. |
| `layer` | `str \| None` | — | New layer name for the target object in modify_contents. |
| `set_active` | `bool \| None` | — | Set active state of target object in modify_contents. |
| `parent` | `str \| None` | — | New parent object name/path within prefab for modify_contents. |
| `components_to_add` | `list[str] \| None` | — | Component types to add in modify_contents. |
| `components_to_remove` | `list[str] \| None` | — | Component types to remove in modify_contents. |
| `create_child` | `dict[str, Any] \| list[dict[str, Any]] \| None` | — | Create child GameObject(s) in the prefab. Single object or array of objects, each with: name (required), parent (optional, defaults to target), source_prefab_path (optional: asset path to instantiate as nested prefab, e.g. 'Assets/Prefabs/Bullet.prefab'), primitive_type (optional: Cube, Sphere, Capsule, Cylinder, Plane, Quad), position, rotation, scale, components_to_add, tag, layer, set_active. source_prefab_path and primitive_type are mutually exclusive. |
| `delete_child` | `str \| list[str] \| None` | — | Child name(s) or path(s) to remove from the prefab. Supports single string or array for batch deletion (e.g. 'Child1' or ['Child1', 'Child1/Grandchild']). |
| `component_properties` | `dict[str, dict[str, Any]] \| None` | — | Set properties on existing components in modify_contents. Keys are component type names, values are dicts of property name to value. Example: {"Rigidbody": {"mass": 5.0}, "MyScript": {"health": 100}}. Supports object references via {"guid": "..."}, {"path": "Assets/..."}, or {"instanceID": 123}. For Sprite sub-assets: {"guid": "...", "spriteName": "<name>"}. Single-sprite textures auto-resolve. |
## 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 -->
@@ -0,0 +1,110 @@
---
title: manage_scene
sidebar_label: manage_scene
description: "Performs CRUD operations on Unity scenes."
---
# `manage_scene`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_scene`
## Description
Performs CRUD operations on Unity scenes. Read-only actions: get_hierarchy, get_active, get_build_settings, get_loaded_scenes, scene_view_frame. Modifying actions: create (with optional template), load (with optional additive flag), save, close_scene, set_active_scene, move_to_scene, validate (with optional auto_repair). For build settings management (add/remove/enable scenes), use manage_build(action='scenes'). For screenshots, use manage_camera (screenshot, screenshot_multiview actions).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'load', 'save', 'get_hierarchy', 'get_active', 'get_build_settings', 'scene_view_frame', 'close_scene', 'set_active_scene', 'get_loaded_scenes', 'move_to_scene', 'validate']` | yes | Perform CRUD operations on Unity scenes and control the Scene View camera. |
| `name` | `str \| None` | — | Scene name. |
| `path` | `str \| None` | — | Scene path. |
| `build_index` | `int \| str \| None` | — | Unity build index (quote as string, e.g., '0'). |
| `scene_view_target` | `str \| int \| None` | — | GameObject reference for scene_view_frame (name, path, or instance ID). |
| `parent` | `str \| int \| None` | — | Optional parent GameObject reference (name/path/instanceID) to list direct children. |
| `page_size` | `int \| str \| None` | — | Page size for get_hierarchy paging. |
| `cursor` | `int \| str \| None` | — | Opaque cursor for paging (offset). |
| `max_nodes` | `int \| str \| None` | — | Hard cap on returned nodes per request (safety). |
| `max_depth` | `int \| str \| None` | — | Accepted for forward-compatibility; current paging returns a single level. |
| `max_children_per_node` | `int \| str \| None` | — | Child paging hint (safety). |
| `include_transform` | `bool \| str \| None` | — | If true, include local transform in node summaries. |
| `scene_name` | `str \| None` | — | Scene name for multi-scene operations. |
| `scene_path` | `str \| None` | — | Full scene path (e.g. 'Assets/Scenes/Level2.unity'). |
| `target` | `str \| int \| None` | — | GameObject reference (name, path, or instanceID) for move_to_scene. |
| `remove_scene` | `bool \| str \| None` | — | For close_scene: true to fully remove, false to just unload. |
| `additive` | `bool \| str \| None` | — | For load: true to open scene additively (keeps current scene). |
| `template` | `str \| None` | — | For create: scene template ('empty', 'default', '3d_basic', '2d_basic'). Omit for empty scene. |
| `auto_repair` | `bool \| str \| None` | — | For validate: true to auto-fix missing scripts (undoable). |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
### Load a scene from `Assets/Scenes/`
> Open `Assets/Scenes/MainMenu.unity`.
```json
{
"action": "load",
"path": "Scenes/MainMenu.unity"
}
```
Paths are relative to `Assets/`. Forward slashes only.
### Get the scene hierarchy (paged)
> List every GameObject in the active scene.
```json
{
"action": "get_hierarchy",
"page_size": 100
}
```
Returns up to `page_size` entries plus a `next_cursor` for the remainder. Always page large hierarchies.
### Save the active scene
> Save the active scene under its existing path.
```json
{ "action": "save" }
```
### Create a scene from a template
> Make a new 3D scene called `Lab`.
```json
{
"action": "create",
"path": "Scenes/Lab.unity",
"template": "3d_basic"
}
```
Other templates: `2d_basic`, `default`, `empty`.
### Additive multi-scene editing
> Load `Scenes/Boss.unity` additively while keeping the current scene open.
```json
{
"action": "load",
"path": "Scenes/Boss.unity",
"additive": true
}
```
Use `set_active_scene`, `close_scene`, and `move_to_scene` to compose multi-scene setups.
<!-- examples:end -->
@@ -0,0 +1,89 @@
---
title: manage_script
sidebar_label: manage_script
description: "Compatibility router for legacy script operations."
---
# `manage_script`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Compatibility router for legacy script operations. Prefer apply_text_edits (ranges) or script_apply_edits (structured) for edits. Read-only action: read. Modifying actions: create, delete.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'read', 'delete']` | yes | Perform CRUD operations on C# scripts. |
| `name` | `str` | yes | Script name (no .cs extension) |
| `path` | `str` | yes | Asset path (default: 'Assets/') |
| `contents` | `str \| None` | — | Contents of the script to create |
| `script_type` | `str \| None` | — | Script type (e.g., 'C#') |
| `namespace` | `str \| None` | — | Namespace for the script |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
:::note Use the right tool for the job
`manage_script` only handles whole-file lifecycle: **create**, **read**, **delete**. For editing existing scripts, reach for:
- **[`script_apply_edits`](./script_apply_edits)** — structured edits (replace method, insert method, anchor-based insert/replace) with balanced-brace guards. Use this for most code changes.
- **[`apply_text_edits`](./apply_text_edits)** — raw line/column text edits with optional SHA precondition. Use for surgical text patches.
- **[`validate_script`](./validate_script)** — Roslyn-based validation (structural or full semantic).
- **[`read_console`](./read_console)** — fetch compile diagnostics after any change.
:::
### Create a new script
> Create `Assets/Scripts/PlayerController.cs` with a starter MonoBehaviour.
```json
{
"action": "create",
"name": "PlayerController",
"path": "Scripts/",
"namespace": "MyGame",
"contents": "using UnityEngine;\n\nnamespace MyGame {\n public class PlayerController : MonoBehaviour {\n void Update() { }\n }\n}\n"
}
```
`path` is relative to `Assets/` and must end in `/`. Omit `contents` to write a minimal stub.
### Read a script's full contents
> Show me `Assets/Scripts/PlayerController.cs`.
```json
{
"action": "read",
"name": "PlayerController",
"path": "Scripts/"
}
```
Returns the full file. For just a SHA (to detect drift between reads and writes), use [`get_sha`](./get_sha) instead — it's cheaper.
### Delete a script
> Remove `Assets/Scripts/PlayerController.cs`.
```json
{
"action": "delete",
"name": "PlayerController",
"path": "Scripts/"
}
```
### After every create / delete
Unity needs a domain reload to compile the new file (or notice the old one is gone). Poll the `editor_state` resource's `isCompiling` field until it flips back to `false`, then run [`read_console`](./read_console) to catch any compile errors before relying on the new types.
<!-- examples:end -->
@@ -0,0 +1,35 @@
---
title: manage_script_capabilities
sidebar_label: manage_script_capabilities
description: "Get manage_script capabilities (supported ops, limits, and guards)."
---
# `manage_script_capabilities`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Get manage_script capabilities (supported ops, limits, and guards).
Returns:
- ops: list of supported structured ops
- text_ops: list of supported text ops
- max_edit_payload_bytes: server edit payload cap
- guards: header/using guard enabled flag
## Parameters
_No parameters._
## 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 -->
@@ -0,0 +1,33 @@
---
title: manage_tools
sidebar_label: manage_tools
description: "Manage which tool groups are visible in this session."
---
# `manage_tools`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_tools`
## Description
Manage which tool groups are visible in this session. Actions: list_groups (show all groups and their status), activate (enable a group), deactivate (disable a group), sync (refresh visibility from Unity Editor's toggle states), reset (restore defaults). Activating a group makes its tools appear; deactivating hides them. Use sync after toggling tools in the Unity Editor GUI.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['list_groups', 'activate', 'deactivate', 'sync', 'reset']` | yes | Action to perform. |
| `group` | `str \| None` | — | Group name (required for activate / deactivate). Valid groups: animation, asset_gen, core, docs, probuilder, profiling, scripting_ext, testing, ui, vfx |
## 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 -->
@@ -0,0 +1,39 @@
---
title: read_console
sidebar_label: read_console
description: "Gets messages from or clears the Unity Editor console."
---
# `read_console`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.read_console`
## Description
Gets messages from or clears the Unity Editor console. Defaults to 10 most recent entries. Use page_size/cursor for paging. Note: For maximum client compatibility, pass count as a quoted string (e.g., '5'). The 'get' action is read-only; 'clear' modifies ephemeral UI state (not project data).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['get', 'clear'] \| None` | — | Get or clear the Unity Editor console. Defaults to 'get' if omitted. |
| `types` | `list[Literal['error', 'warning', 'log', 'all']] \| str \| None` | — | Message types to get (accepts list or JSON string) |
| `count` | `int \| str \| None` | — | Max messages to return in non-paging mode (accepts int or string, e.g., 5 or '5'). Ignored when paging with page_size/cursor. |
| `filter_text` | `str \| None` | — | Text filter for messages |
| `page_size` | `int \| str \| None` | — | Page size for paginated console reads. Defaults to 50 when omitted. |
| `cursor` | `int \| str \| None` | — | Opaque cursor for paging (0-based offset). Defaults to 0. |
| `format` | `Literal['plain', 'detailed', 'json'] \| None` | — | Output format |
| `include_stacktrace` | `bool \| str \| None` | — | Include stack traces in output (accepts true/false or 'true'/'false') |
## 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 -->
@@ -0,0 +1,35 @@
---
title: refresh_unity
sidebar_label: refresh_unity
description: "Request a Unity asset database refresh and optionally a script compilation."
---
# `refresh_unity`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.refresh_unity`
## Description
Request a Unity asset database refresh and optionally a script compilation. Can optionally wait for readiness.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `mode` | `Literal['if_dirty', 'force']` | — | Refresh mode |
| `scope` | `Literal['assets', 'scripts', 'all']` | — | Refresh scope |
| `compile` | `Literal['none', 'request']` | — | Whether to request compilation |
| `wait_for_ready` | `bool` | — | If true, wait until editor_state.advice.ready_for_tools is true |
## 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 -->
@@ -0,0 +1,186 @@
---
title: script_apply_edits
sidebar_label: script_apply_edits
description: "Structured C# edits (methods/classes) with safer boundaries - prefer this over raw text."
---
# `script_apply_edits`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.script_apply_edits`
## Description
Structured C# edits (methods/classes) with safer boundaries - prefer this over raw text.
Best practices:
- Prefer anchor_* ops for pattern-based insert/replace near stable markers
- Use replace_method/delete_method for whole-method changes (keeps signatures balanced)
- Avoid whole-file regex deletes; validators will guard unbalanced braces
- For tail insertions, prefer anchor/regex_replace on final brace (class closing)
- Pass options.validate='standard' for structural checks; 'basic' for interior-only edits
Canonical fields (use these exact keys):
- op: replace_method | insert_method | delete_method | anchor_insert | anchor_delete | anchor_replace
- className: string (defaults to 'name' if omitted on method/class ops)
- methodName: string (required for replace_method, delete_method)
- replacement: string (required for replace_method, insert_method)
- position: start | end | after | before (insert_method only)
- afterMethodName / beforeMethodName: string (required when position='after'/'before')
- anchor: regex string (for anchor_* ops)
- text: string (for anchor_insert/anchor_replace)
Examples:
1) Replace a method:
{
"name": "SmartReach",
"path": "Assets/Scripts/Interaction",
"edits": [
{
"op": "replace_method",
"className": "SmartReach",
"methodName": "HasTarget",
"replacement": "public bool HasTarget(){ return currentTarget!=null; }"
}
],
"options": {"validate": "standard", "refresh": "immediate"}
}
"2) Insert a method after another:
{
"name": "SmartReach",
"path": "Assets/Scripts/Interaction",
"edits": [
{
"op": "insert_method",
"className": "SmartReach",
"replacement": "public void PrintSeries(){ Debug.Log(seriesName); }",
"position": "after",
"afterMethodName": "GetCurrentTarget"
}
],
}
]
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `str` | yes | Name of the script to edit |
| `path` | `str` | yes | Path to the script to edit under Assets/ directory |
| `edits` | `list[dict[str, Any]] \| str` | yes | List of edits to apply to the script (JSON list or stringified JSON) |
| `options` | `dict[str, Any] \| None` | — | Options for the script edit |
| `script_type` | `str` | — | Type of the script to edit |
| `namespace` | `str \| None` | — | Namespace of the script to edit |
## Returns
A `dict` containing the Unity response. The exact shape depends on the action.
## Examples
<!-- examples:start -->
:::tip
Prefer this over [`apply_text_edits`](./apply_text_edits) for method-level changes. Structured ops keep braces balanced and survive incidental whitespace drift. Use `apply_text_edits` only when you need surgical line/column patching.
:::
### Replace a single method
> In `Assets/Scripts/PlayerController.cs`, make `HasTarget` return `currentTarget != null`.
```json
{
"name": "PlayerController",
"path": "Scripts/",
"edits": [
{
"op": "replace_method",
"className": "PlayerController",
"methodName": "HasTarget",
"replacement": "public bool HasTarget() { return currentTarget != null; }"
}
],
"options": { "validate": "standard", "refresh": "immediate" }
}
```
`path` ends with `/`. `validate: 'standard'` runs Roslyn structural checks before the write commits; use `'basic'` for cheap interior-only checks when you're touching a method body and trust the signature.
### Insert a new method at the end of a class
> Add a `Reset()` method after `Update` in `PlayerController`.
```json
{
"name": "PlayerController",
"path": "Scripts/",
"edits": [
{
"op": "insert_method",
"className": "PlayerController",
"methodName": "Update",
"position": "after",
"replacement": "void Reset() { currentTarget = null; }"
}
]
}
```
`position`: `start | end | before | after`. With `before`/`after`, `methodName` is the anchor; with `start`/`end`, it's the position within the class body.
### Delete a method
> Remove `PlayerController.LegacyTick`.
```json
{
"name": "PlayerController",
"path": "Scripts/",
"edits": [
{ "op": "delete_method", "className": "PlayerController", "methodName": "LegacyTick" }
]
}
```
### Anchor-based insert (around a regex marker)
> Add a `Debug.Log` right after the line containing `// --- input ---`.
```json
{
"name": "PlayerController",
"path": "Scripts/",
"edits": [
{
"op": "anchor_insert",
"anchor": "//\\s*---\\s*input\\s*---",
"position": "after",
"replacement": " Debug.Log(\"input frame\");"
}
]
}
```
Anchor ops are great for adding instrumentation near stable comment markers without locking into exact line numbers. The anchor is a regex; escape literal characters.
### Apply several edits atomically
> Replace two methods AND remove a third — all in one transaction. If validation fails on any, nothing is written.
```json
{
"name": "PlayerController",
"path": "Scripts/",
"edits": [
{ "op": "replace_method", "methodName": "Awake", "replacement": "void Awake() { Init(); }" },
{ "op": "replace_method", "methodName": "Update", "replacement": "void Update() { Tick(); }" },
{ "op": "delete_method", "methodName": "OnDestroyOld" }
],
"options": { "validate": "standard" }
}
```
`className` defaults to `name` when omitted on method ops, so for single-class files you can skip it.
### After every edit
Poll `editor_state.isCompiling` until it flips back to `false`, then run [`read_console`](./read_console) to catch any compile errors before relying on the new types.
<!-- examples:end -->
@@ -0,0 +1,32 @@
---
title: set_active_instance
sidebar_label: set_active_instance
description: "Set the active Unity instance for this client/session."
---
# `set_active_instance`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.set_active_instance`
## Description
Set the active Unity instance for this client/session. Accepts Name@hash, hash prefix, or port number (stdio only).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `instance` | `str` | yes | Target instance (Name@hash, hash prefix, or port number in stdio mode) |
## 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 -->
@@ -0,0 +1,34 @@
---
title: validate_script
sidebar_label: validate_script
description: "Validate a C# script and return diagnostics."
---
# `validate_script`
> **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` &nbsp;·&nbsp; **Module:** `services.tools.manage_script`
## Description
Validate a C# script and return diagnostics.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `uri` | `str` | yes | URI of the script to validate under Assets/ directory, mcpforunity://path/Assets/... or file://... or Assets/... |
| `level` | `Literal['basic', 'standard']` | — | Validation level |
| `include_diagnostics` | `bool` | — | Include full diagnostics and summary |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "docs",
"link": {
"type": "doc",
"id": "reference/tools/docs/index"
},
"collapsed": true
}
@@ -0,0 +1,12 @@
---
title: "docs tools"
sidebar_label: "docs"
description: "MCP for Unity tools in the docs group."
---
# `docs` tools
Unity API reflection and documentation lookup
- **[`unity_docs`](./unity_docs.md)** — Fetch official Unity documentation from docs.unity3d.com.
- **[`unity_reflect`](./unity_reflect.md)** — Inspect Unity's live C# API via reflection.
@@ -0,0 +1,47 @@
---
title: unity_docs
sidebar_label: unity_docs
description: "Fetch official Unity documentation from docs.unity3d.com."
---
# `unity_docs`
> **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:** `docs` &nbsp;·&nbsp; **Module:** `services.tools.unity_docs`
## Description
Fetch official Unity documentation from docs.unity3d.com. Returns descriptions, parameter details, code examples, and caveats. Use after unity_reflect confirms a type exists, to get usage patterns, gotchas, and code examples before writing implementation code.
Actions:
- get_doc: Fetch ScriptReference docs for a class or member. Requires class_name. Optional member_name, version.
- get_manual: Fetch a Unity Manual page. Requires slug (e.g., 'execution-order', 'urp/urp-introduction'). Optional version.
- get_package_doc: Fetch package documentation. Requires package, page, pkg_version (e.g., package='com.unity.render-pipelines.universal', page='2d-index', pkg_version='17.0').
- lookup: Search all doc sources in parallel (ScriptReference + Manual + package docs). Requires query or queries (comma-separated). Supports batch: queries='Physics.Raycast,NavMeshAgent,Light2D' searches all in one call. Optional package + pkg_version to also search package docs.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The documentation action to perform. |
| `class_name` | `str \| None` | — | Unity class name (e.g. 'Physics', 'Transform'). |
| `member_name` | `str \| None` | — | Method or property name to look up. |
| `version` | `str \| None` | — | Unity version (e.g. '6000.0.38f1'). Auto-extracted. |
| `slug` | `str \| None` | — | Manual page slug (e.g., 'execution-order'). |
| `package` | `str \| None` | — | Package name (e.g., 'com.unity.render-pipelines.universal'). |
| `page` | `str \| None` | — | Package doc page (e.g., 'index', '2d-index'). |
| `pkg_version` | `str \| None` | — | Package version major.minor (e.g., '17.0'). |
| `query` | `str \| None` | — | Single search query for lookup (class name, topic, or slug). |
| `queries` | `str \| None` | — | Comma-separated search queries for batch lookup (e.g., 'Physics.Raycast,NavMeshAgent,Light2D'). |
## 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 -->
@@ -0,0 +1,41 @@
---
title: unity_reflect
sidebar_label: unity_reflect
description: "Inspect Unity's live C# API via reflection."
---
# `unity_reflect`
> **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:** `docs` &nbsp;·&nbsp; **Module:** `services.tools.unity_reflect`
## Description
Inspect Unity's live C# API via reflection. Use this to verify that classes, methods, and properties exist before writing C# code — training data may be wrong or outdated.
Actions:
- get_type: Member summary (names only) for a class. Requires class_name.
- get_member: Full signature detail for one member. Requires class_name + member_name.
- search: Type name search across loaded assemblies. Requires query. Optional scope.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The reflection action to perform. |
| `class_name` | `str \| None` | — | Fully qualified or simple C# class name. |
| `member_name` | `str \| None` | — | Method, property, or field name to inspect. |
| `query` | `str \| None` | — | Search query for type name search. |
| `scope` | `str \| None` | — | Assembly scope for search: unity, packages, project, all. |
## 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 -->
+91
View File
@@ -0,0 +1,91 @@
---
title: Tool reference
sidebar_label: Tools
sidebar_class_name: sidebar-hidden
slug: /reference/tools
description: Auto-generated catalog of every MCP for Unity tool, grouped by domain.
---
# Tool reference
> **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.
Every tool MCP for Unity exposes, generated directly from the Python `@mcp_for_unity_tool` registry under `Server/src/services/tools/`.
## `animation` &nbsp; (1 tool)
Animator control & AnimationClip creation
- **[`manage_animation`](./animation/manage_animation.md)** — Manage Unity animation: Animator control and AnimationClip creation.
## `asset_gen` &nbsp; (4 tools)
AI asset generation 3D model gen/import & 2D image gen (bring-your-own-key)
- **[`generate_image`](./asset_gen/generate_image.md)** — Generate 2D images with AI providers (fal.ai, OpenRouter) and import them as textures/sprites into the Unity project.
- **[`generate_model`](./asset_gen/generate_model.md)** — Generate 3D models with AI providers (Tripo, Meshy) and import them into the Unity project.
- **[`import_model`](./asset_gen/import_model.md)** — Import 3D models from the Sketchfab marketplace into the Unity project.
- **[`import_model_file`](./asset_gen/import_model_file.md)** — Import a local 3D model file that already exists on disk (e.g. an FBX/OBJ/glTF exported from Blender or another DCC tool) into the Unity project.
## `core` &nbsp; (30 tools)
Essential scene, script, asset & editor tools (always on by default)
- **[`apply_text_edits`](./core/apply_text_edits.md)** — Apply small text edits to a C# script identified by URI.
- **[`batch_execute`](./core/batch_execute.md)** — Executes multiple MCP commands in a single batch for dramatically better performance.
- **[`create_script`](./core/create_script.md)** — Create a new C# script at the given project path.
- **[`debug_request_context`](./core/debug_request_context.md)** — Return the current FastMCP request context details (client_id, session_id, and meta dump).
- **[`delete_script`](./core/delete_script.md)** — Delete a C# script by URI or Assets-relative path.
- **[`execute_custom_tool`](./core/execute_custom_tool.md)** — Execute a project-scoped custom tool registered by Unity.
- **[`execute_menu_item`](./core/execute_menu_item.md)** — Execute a Unity menu item by path.
- **[`find_gameobjects`](./core/find_gameobjects.md)** — Search for GameObjects in the scene by name, tag, layer, component type, or path.
- **[`find_in_file`](./core/find_in_file.md)** — Searches a file with a regex pattern and returns line numbers and excerpts.
- **[`get_sha`](./core/get_sha.md)** — Get SHA256 and basic metadata for a Unity C# script without returning file contents.
- **[`manage_asset`](./core/manage_asset.md)** — Performs asset operations (import, create, modify, delete, etc.) in Unity.
- **[`manage_build`](./core/manage_build.md)** — Manage Unity player builds — trigger builds, switch platforms, configure settings, manage build scenes and profiles, run batch builds across platforms.
- **[`manage_camera`](./core/manage_camera.md)** — Manage cameras (Unity Camera + Cinemachine).
- **[`manage_components`](./core/manage_components.md)** — Add, remove, or set properties on components attached to GameObjects.
- **[`manage_editor`](./core/manage_editor.md)** — Controls and queries the Unity editor's state and settings.
- **[`manage_gameobject`](./core/manage_gameobject.md)** — Performs CRUD operations on GameObjects.
- **[`manage_graphics`](./core/manage_graphics.md)** — Manage rendering graphics: volumes, post-processing, light baking, rendering stats, pipeline settings, and URP renderer features.
- **[`manage_material`](./core/manage_material.md)** — Manages Unity materials (set properties, colors, shaders, etc).
- **[`manage_packages`](./core/manage_packages.md)** — Manage Unity packages: query, install, remove, embed, and configure registries.
- **[`manage_physics`](./core/manage_physics.md)** — Manage physics settings, collision matrix, materials, joints, queries, and validation.
- **[`manage_prefabs`](./core/manage_prefabs.md)** — Manages Unity Prefab assets.
- **[`manage_scene`](./core/manage_scene.md)** — Performs CRUD operations on Unity scenes.
- **[`manage_script`](./core/manage_script.md)** — Compatibility router for legacy script operations.
- **[`manage_script_capabilities`](./core/manage_script_capabilities.md)** — Get manage_script capabilities (supported ops, limits, and guards).
- **[`manage_tools`](./core/manage_tools.md)** — Manage which tool groups are visible in this session.
- **[`read_console`](./core/read_console.md)** — Gets messages from or clears the Unity Editor console.
- **[`refresh_unity`](./core/refresh_unity.md)** — Request a Unity asset database refresh and optionally a script compilation.
- **[`script_apply_edits`](./core/script_apply_edits.md)** — Structured C# edits (methods/classes) with safer boundaries - prefer this over raw text.
- **[`set_active_instance`](./core/set_active_instance.md)** — Set the active Unity instance for this client/session.
- **[`validate_script`](./core/validate_script.md)** — Validate a C# script and return diagnostics.
## `docs` &nbsp; (2 tools)
Unity API reflection and documentation lookup
- **[`unity_docs`](./docs/unity_docs.md)** — Fetch official Unity documentation from docs.unity3d.com.
- **[`unity_reflect`](./docs/unity_reflect.md)** — Inspect Unity's live C# API via reflection.
## `probuilder` &nbsp; (1 tool)
ProBuilder 3D modeling requires com.unity.probuilder package
- **[`manage_probuilder`](./probuilder/manage_probuilder.md)** — Manage ProBuilder meshes for in-editor 3D modeling.
## `profiling` &nbsp; (1 tool)
Unity Profiler session control, counters, memory snapshots & Frame Debugger
- **[`manage_profiler`](./profiling/manage_profiler.md)** — Unity Profiler session control, counter reads, memory snapshots, and Frame Debugger.
## `scripting_ext` &nbsp; (2 tools)
ScriptableObject management
- **[`execute_code`](./scripting_ext/execute_code.md)** — Execute arbitrary C# code inside the Unity Editor.
- **[`manage_scriptable_object`](./scripting_ext/manage_scriptable_object.md)** — Creates and modifies ScriptableObject assets using Unity SerializedObject property paths.
## `testing` &nbsp; (2 tools)
Test runner & async test jobs
- **[`get_test_job`](./testing/get_test_job.md)** — Polls an async Unity test job by job_id.
- **[`run_tests`](./testing/run_tests.md)** — Starts a Unity test run asynchronously and returns a job_id immediately.
## `ui` &nbsp; (1 tool)
UI Toolkit (UXML, USS, UIDocument)
- **[`manage_ui`](./ui/manage_ui.md)** — Manages Unity UI Toolkit elements (UXML documents, USS stylesheets, UIDocument components).
## `vfx` &nbsp; (3 tools)
Visual effects VFX Graph, shaders, procedural textures
- **[`manage_shader`](./vfx/manage_shader.md)** — Manages shader scripts in Unity (create, read, update, delete).
- **[`manage_texture`](./vfx/manage_texture.md)** — Procedural texture generation for Unity.
- **[`manage_vfx`](./vfx/manage_vfx.md)** — Manage Unity VFX components (ParticleSystem, VisualEffect, LineRenderer, TrailRenderer).
@@ -0,0 +1,8 @@
{
"label": "probuilder",
"link": {
"type": "doc",
"id": "reference/tools/probuilder/index"
},
"collapsed": true
}
@@ -0,0 +1,11 @@
---
title: "probuilder tools"
sidebar_label: "probuilder"
description: "MCP for Unity tools in the probuilder group."
---
# `probuilder` tools
ProBuilder 3D modeling requires com.unity.probuilder package
- **[`manage_probuilder`](./manage_probuilder.md)** — Manage ProBuilder meshes for in-editor 3D modeling.
@@ -0,0 +1,88 @@
---
title: manage_probuilder
sidebar_label: manage_probuilder
description: "Manage ProBuilder meshes for in-editor 3D modeling."
---
# `manage_probuilder`
> **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:** `probuilder` &nbsp;·&nbsp; **Module:** `services.tools.manage_probuilder`
## Description
Manage ProBuilder meshes for in-editor 3D modeling. Requires com.unity.probuilder package.
SHAPE CREATION:
- create_shape: Create a ProBuilder primitive (shape_type: Cube/Cylinder/Sphere/Plane/Cone/Torus/Pipe/Arch/Stair/CurvedStair/Door/Prism). Shape-specific params in properties (size, radius, height, depth, width, segments, rows, columns, innerRadius, outerRadius, etc.).
- create_poly_shape: Create mesh from 2D polygon footprint (points: [[x,y,z],...], extrudeHeight, flipNormals).
MESH EDITING:
- extrude_faces: Extrude faces outward (faceIndices, distance, method: FaceNormal/VertexNormal/IndividualFaces).
- extrude_edges: Extrude edges (edgeIndices or edges [{a,b},...], distance, asGroup).
- bevel_edges: Bevel edges (edgeIndices or edges [{a,b},...], amount 0-1).
- subdivide: Subdivide faces (faceIndices optional, all if omitted).
- delete_faces: Delete faces (faceIndices).
- bridge_edges: Bridge two open edges (edgeA, edgeB as {a,b} pairs, allowNonManifold).
- connect_elements: Connect edges or faces (edgeIndices/edges or faceIndices).
- detach_faces: Detach faces (faceIndices, deleteSourceFaces: bool).
- flip_normals: Flip face normals (faceIndices).
- merge_faces: Merge faces into one (faceIndices).
- combine_meshes: Combine multiple ProBuilder objects (targets: list of GameObjects).
- merge_objects: Merge objects into one ProBuilder mesh (targets list, auto-converts).
- duplicate_and_flip: Create double-sided geometry (faceIndices).
- create_polygon: Connect existing vertices into a new face (vertexIndices, unordered).
VERTEX OPERATIONS:
- merge_vertices: Collapse vertices to single point (vertexIndices, collapseToFirst).
- weld_vertices: Weld vertices within proximity radius (vertexIndices, radius).
- split_vertices: Split shared vertices (vertexIndices).
- move_vertices: Translate vertices (vertexIndices, offset [x,y,z]).
- insert_vertex: Insert vertex on edge ({a,b}) or face (faceIndex) at point [x,y,z].
- append_vertices_to_edge: Insert evenly-spaced points on edges (edgeIndices/edges, count).
SELECTION:
- select_faces: Select faces by criteria (direction: up/down/forward/back/left/right, tolerance, growFrom, growAngle, floodFrom, floodAngle, loopFrom, ring). Returns faceIndices array for use with other actions.
UV & MATERIALS:
- set_face_material: Assign material to faces (faceIndices optional — all faces when omitted, materialPath).
- set_face_color: Set vertex color on faces (faceIndices optional — all faces when omitted, color [r,g,b,a]).
- set_face_uvs: Set UV auto-unwrap params (faceIndices optional — all faces when omitted, scale, offset, rotation, flipU, flipV).
QUERY:
- get_mesh_info: Get ProBuilder mesh details. Use include parameter to control detail level: 'summary' (default: counts, bounds, materials), 'faces' (+ face normals/centers/directions), 'edges' (+ edge vertex pairs), 'all' (everything). Each face includes direction ('top','bottom','front','back','left','right') for semantic selection.
- convert_to_probuilder: Convert a standard Unity mesh into ProBuilder for editing.
SMOOTHING:
- set_smoothing: Set smoothing group on faces (faceIndices, smoothingGroup: 0=hard, 1+=smooth).
- auto_smooth: Auto-assign smoothing groups by angle (angleThreshold: default 30).
MESH UTILITIES:
- center_pivot: Move pivot point to mesh bounds center.
- set_pivot: Set pivot to arbitrary world position (position [x,y,z]).
- freeze_transform: Bake position/rotation/scale into vertex data, reset transform.
- validate_mesh: Check mesh health (degenerate triangles, unused vertices). Read-only.
- repair_mesh: Auto-fix degenerate triangles and unused vertices.
WORKFLOW TIP: Call get_mesh_info with include='faces' to see face normals and directions before editing. Each face shows its direction ('top','bottom','front','back','left','right') so you can pick the right indices for operations like extrude_faces or delete_faces.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | Action to perform. |
| `target` | `str \| None` | — | Target GameObject (name/path/id). |
| `search_method` | `Literal['by_id', 'by_name', 'by_path', 'by_tag', 'by_layer'] \| None` | — | How to find the target GameObject. |
| `properties` | `dict[str, Any] \| str \| None` | — | Action-specific parameters (dict or JSON string). |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "profiling",
"link": {
"type": "doc",
"id": "reference/tools/profiling/index"
},
"collapsed": true
}
@@ -0,0 +1,11 @@
---
title: "profiling tools"
sidebar_label: "profiling"
description: "MCP for Unity tools in the profiling group."
---
# `profiling` tools
Unity Profiler session control, counters, memory snapshots & Frame Debugger
- **[`manage_profiler`](./manage_profiler.md)** — Unity Profiler session control, counter reads, memory snapshots, and Frame Debugger.
@@ -0,0 +1,65 @@
---
title: manage_profiler
sidebar_label: manage_profiler
description: "Unity Profiler session control, counter reads, memory snapshots, and Frame Debugger."
---
# `manage_profiler`
> **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:** `profiling` &nbsp;·&nbsp; **Module:** `services.tools.manage_profiler`
## Description
Unity Profiler session control, counter reads, memory snapshots, and Frame Debugger.
SESSION:
- profiler_start: Enable profiler, optionally record to .raw file (log_file, enable_callstacks)
- profiler_stop: Disable profiler, stop recording
- profiler_status: Get enabled state, active areas, recording path
- profiler_set_areas: Toggle ProfilerAreas on/off (areas dict)
COUNTERS:
- get_frame_timing: FrameTimingManager data (12 fields, synchronous)
- get_counters: Generic counter read by category + optional counter names (async, 1-frame wait)
- get_object_memory: Memory size of a specific object by path
MEMORY SNAPSHOT (requires com.unity.memoryprofiler):
- memory_take_snapshot: Capture memory snapshot to file
- memory_list_snapshots: List available .snap files
- memory_compare_snapshots: Compare two snapshot files
FRAME DEBUGGER:
- frame_debugger_enable: Turn on Frame Debugger, report event count
- frame_debugger_disable: Turn off Frame Debugger
- frame_debugger_get_events: Get draw call events (paged, best-effort via reflection)
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | The profiler action to perform. |
| `category` | `str \| None` | — | Profiler category name for get_counters (e.g. Render, Scripts, Memory, Physics). |
| `counters` | `list[str] \| None` | — | Specific counter names for get_counters. Omit to read all in category. |
| `object_path` | `str \| None` | — | Scene hierarchy or asset path for get_object_memory. |
| `log_file` | `str \| None` | — | Path to .raw file for profiler_start recording. |
| `enable_callstacks` | `bool \| None` | — | Enable allocation callstacks for profiler_start. |
| `areas` | `dict[str, bool] \| None` | — | Dict of area name to bool for profiler_set_areas. |
| `snapshot_path` | `str \| None` | — | Output path for memory_take_snapshot. |
| `search_path` | `str \| None` | — | Search directory for memory_list_snapshots. |
| `snapshot_a` | `str \| None` | — | First snapshot path for memory_compare_snapshots. |
| `snapshot_b` | `str \| None` | — | Second snapshot path for memory_compare_snapshots. |
| `page_size` | `int \| None` | — | Page size for frame_debugger_get_events (default 50). |
| `cursor` | `int \| None` | — | Cursor offset for frame_debugger_get_events. |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "scripting_ext",
"link": {
"type": "doc",
"id": "reference/tools/scripting_ext/index"
},
"collapsed": true
}
@@ -0,0 +1,37 @@
---
title: execute_code
sidebar_label: execute_code
description: "Execute arbitrary C# code inside the Unity Editor."
---
# `execute_code`
> **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:** `scripting_ext` &nbsp;·&nbsp; **Module:** `services.tools.execute_code`
## Description
Execute arbitrary C# code inside the Unity Editor. The code runs as a method body with access to UnityEngine and UnityEditor namespaces. Use 'return' to send data back. Compiled in-memory — no script files created. Actions: execute (run code), get_history (list past executions), replay (re-run a history entry), clear_history. NOTE: safety_checks blocks known dangerous patterns but is not a full sandbox. Compiler options: 'auto' (Roslyn if available, else CodeDom), 'roslyn' (C# 12+, requires Microsoft.CodeAnalysis), 'codedom' (C# 6 only).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['execute', 'get_history', 'replay', 'clear_history']` | yes | Action to perform. |
| `code` | `str \| None` | — | C# code to execute (for 'execute' action). Must be a valid method body. Access UnityEngine and UnityEditor namespaces. Use 'return' to send data back. |
| `safety_checks` | `bool` | — | Enable basic blocked-pattern checks (File.Delete, Process.Start, infinite loops, etc). Not a full sandbox — advanced bypass is possible. Default: true. |
| `index` | `int \| None` | — | History entry index to replay (for 'replay' action). |
| `limit` | `int` | — | Number of history entries to return (for 'get_history' action, 1-50). Default: 10. |
| `compiler` | `Literal['auto', 'roslyn', 'codedom']` | — | Compiler backend for 'execute' action. 'auto' uses Roslyn if Microsoft.CodeAnalysis is installed, else falls back to CodeDom. 'roslyn' forces Roslyn (C# 12+). 'codedom' forces legacy CSharpCodeProvider (C# 6). Default: auto. |
## 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 -->
@@ -0,0 +1,12 @@
---
title: "scripting_ext tools"
sidebar_label: "scripting_ext"
description: "MCP for Unity tools in the scripting_ext group."
---
# `scripting_ext` tools
ScriptableObject management
- **[`execute_code`](./execute_code.md)** — Execute arbitrary C# code inside the Unity Editor.
- **[`manage_scriptable_object`](./manage_scriptable_object.md)** — Creates and modifies ScriptableObject assets using Unity SerializedObject property paths.
@@ -0,0 +1,39 @@
---
title: manage_scriptable_object
sidebar_label: manage_scriptable_object
description: "Creates and modifies ScriptableObject assets using Unity SerializedObject property paths."
---
# `manage_scriptable_object`
> **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:** `scripting_ext` &nbsp;·&nbsp; **Module:** `services.tools.manage_scriptable_object`
## Description
Creates and modifies ScriptableObject assets using Unity SerializedObject property paths.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'modify']` | yes | Action to perform: create or modify. |
| `type_name` | `str \| None` | — | Namespace-qualified ScriptableObject type name (for create). |
| `folder_path` | `str \| None` | — | Target folder under Assets/... (for create). |
| `asset_name` | `str \| None` | — | Asset file name without extension (for create). |
| `overwrite` | `bool \| str \| None` | — | If true, overwrite existing asset at same path (for create). |
| `target` | `dict[str, Any] \| str \| None` | — | Target asset reference {guid\|path} (for modify). |
| `patches` | `list[dict[str, Any]] \| str \| None` | — | Patch list (or JSON string) to apply. For object references: use {"ref": {"guid": "..."}} or {"value": {"guid": "..."}}. For Sprite sub-assets: include "spriteName" in the ref/value object. Single-sprite textures auto-resolve from guid/path alone. |
| `dry_run` | `bool \| str \| None` | — | If true, validate patches without applying (modify only). |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "testing",
"link": {
"type": "doc",
"id": "reference/tools/testing/index"
},
"collapsed": true
}
@@ -0,0 +1,35 @@
---
title: get_test_job
sidebar_label: get_test_job
description: "Polls an async Unity test job by job_id."
---
# `get_test_job`
> **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:** `testing` &nbsp;·&nbsp; **Module:** `services.tools.run_tests`
## Description
Polls an async Unity test job by job_id.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `job_id` | `str` | yes | Job id returned by run_tests |
| `include_failed_tests` | `bool` | — | Include details for failed/skipped tests only (default: false) |
| `include_details` | `bool` | — | Include details for all tests (default: false) |
| `wait_timeout` | `int \| None` | — | If set, wait up to this many seconds for tests to complete before returning. Reduces polling frequency and avoids client-side loop detection. Recommended: 30-60 seconds. Returns immediately if tests complete sooner. |
## 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 -->
@@ -0,0 +1,12 @@
---
title: "testing tools"
sidebar_label: "testing"
description: "MCP for Unity tools in the testing group."
---
# `testing` tools
Test runner & async test jobs
- **[`get_test_job`](./get_test_job.md)** — Polls an async Unity test job by job_id.
- **[`run_tests`](./run_tests.md)** — Starts a Unity test run asynchronously and returns a job_id immediately.
@@ -0,0 +1,39 @@
---
title: run_tests
sidebar_label: run_tests
description: "Starts a Unity test run asynchronously and returns a job_id immediately."
---
# `run_tests`
> **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:** `testing` &nbsp;·&nbsp; **Module:** `services.tools.run_tests`
## Description
Starts a Unity test run asynchronously and returns a job_id immediately. Poll with get_test_job for progress.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `mode` | `Literal['EditMode', 'PlayMode']` | — | Unity test mode to run |
| `test_names` | `list[str] \| str \| None` | — | Full names of specific tests to run |
| `group_names` | `list[str] \| str \| None` | — | Same as test_names, except it allows for Regex |
| `category_names` | `list[str] \| str \| None` | — | NUnit category names to filter by |
| `assembly_names` | `list[str] \| str \| None` | — | Assembly names to filter tests by |
| `include_failed_tests` | `bool` | — | Include details for failed/skipped tests only (default: false) |
| `include_details` | `bool` | — | Include details for all tests (default: false) |
| `init_timeout` | `int \| None` | — | Initialization timeout in milliseconds. PlayMode tests may need longer due to domain reload (default: 15000). Recommended: 120000 for PlayMode. |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "ui",
"link": {
"type": "doc",
"id": "reference/tools/ui/index"
},
"collapsed": true
}
+11
View File
@@ -0,0 +1,11 @@
---
title: "ui tools"
sidebar_label: "ui"
description: "MCP for Unity tools in the ui group."
---
# `ui` tools
UI Toolkit (UXML, USS, UIDocument)
- **[`manage_ui`](./manage_ui.md)** — Manages Unity UI Toolkit elements (UXML documents, USS stylesheets, UIDocument components).
@@ -0,0 +1,80 @@
---
title: manage_ui
sidebar_label: manage_ui
description: "Manages Unity UI Toolkit elements (UXML documents, USS stylesheets, UIDocument components)."
---
# `manage_ui`
> **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:** `ui` &nbsp;·&nbsp; **Module:** `services.tools.manage_ui`
## Description
Manages Unity UI Toolkit elements (UXML documents, USS stylesheets, UIDocument components). Read-only actions: ping, read, get_visual_tree, list. Modifying actions: create, update, delete, attach_ui_document, detach_ui_document, create_panel_settings, update_panel_settings, modify_visual_element.
Visual actions: render_ui (captures UI panel to a PNG screenshot for self-evaluation).
Structural actions: link_stylesheet (adds a Style src reference to a UXML file).
UI Toolkit workflow:
1. Use list to discover existing UI assets
2. Create a UXML file (structure, like HTML)
3. Create a USS file (styling, like CSS)
4. Link stylesheet to UXML via link_stylesheet
5. Attach UIDocument to a GameObject with the UXML source
6. Use get_visual_tree to inspect the result
7. Use modify_visual_element to change text, classes, or inline styles on live elements
8. Use render_ui to capture a visual preview for self-evaluation
- In play mode: first call queues a WaitForEndOfFrame screen capture and returns pending=true;
call render_ui a second time to retrieve the saved PNG (hasContent will be true).
- In editor mode: assigns a RenderTexture to PanelSettings (best-effort; may stay blank).
9. Use detach_ui_document to remove UIDocument from a GameObject
10. Use delete to remove .uxml/.uss files
Important: Always use <ui:Style> (with the ui: namespace prefix) in UXML, not bare <Style>. UI Builder will fail to open files that use <Style> without the prefix.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['ping', 'create', 'read', 'update', 'delete', 'attach_ui_document', 'detach_ui_document', 'create_panel_settings', 'update_panel_settings', 'get_visual_tree', 'render_ui', 'link_stylesheet', 'list', 'modify_visual_element']` | yes | Action to perform. |
| `path` | `str \| None` | — | Assets-relative path (e.g., 'Assets/UI/MainMenu.uxml' or 'Assets/UI/Styles.uss'). For render_ui: optional UXML path to render directly without a scene GameObject. |
| `contents` | `str \| None` | — | File content (UXML or USS markup). Plain text - encoding handled automatically. |
| `target` | `str \| None` | — | Target GameObject name or path for attach_ui_document / get_visual_tree / render_ui. |
| `source_asset` | `str \| None` | — | Path to UXML VisualTreeAsset (e.g., 'Assets/UI/MainMenu.uxml'). |
| `panel_settings` | `str \| None` | — | Path to PanelSettings asset. Auto-creates default if omitted. |
| `sort_order` | `int \| None` | — | UIDocument sort order (default 0). |
| `scale_mode` | `Literal['ConstantPixelSize', 'ConstantPhysicalSize', 'ScaleWithScreenSize'] \| None` | — | Panel scale mode. Legacy shorthand; prefer using 'settings' dict. |
| `reference_resolution` | `dict[str, int] \| None` | — | Reference resolution as {width, height}. Legacy shorthand; prefer using 'settings' dict. |
| `settings` | `dict[str, Any] \| None` | — | Generic PanelSettings properties dict for create_panel_settings. Keys: scaleMode (ConstantPixelSize\|ConstantPhysicalSize\|ScaleWithScreenSize), referenceResolution ({width,height}), screenMatchMode (MatchWidthOrHeight\|ShrinkToFit\|ExpandToFill), match (0-1 float), referenceDpi, fallbackDpi, sortingOrder, targetDisplay, clearColor (bool), colorClearValue (#RRGGBB or {r,g,b,a}), clearDepthStencil, themeStyleSheet (asset path), dynamicAtlasSettings ({minAtlasSize,maxAtlasSize,maxSubTextureSize,activeFilters}). |
| `max_depth` | `int \| None` | — | Max depth to traverse visual tree (default 10). |
| `width` | `int \| None` | — | Render width in pixels (default 1920). For render_ui. |
| `height` | `int \| None` | — | Render height in pixels (default 1080). For render_ui. |
| `include_image` | `bool \| None` | — | Return inline base64 PNG in the response (default false). For render_ui. |
| `max_resolution` | `int \| None` | — | Max resolution for inline base64 image (default 640). For render_ui. |
| `screenshot_file_name` | `str \| None` | — | Custom file name for the render output (default: auto-generated). For render_ui. |
| `output_folder` | `str \| None` | — | Optional folder for the render output. Project-relative (e.g. 'Assets/Screenshots' or 'Captures') or absolute path inside the project. Overrides the user's Editor preference. If omitted, falls back to the Editor preference, then to the built-in default (Assets/Screenshots). For render_ui. |
| `stylesheet` | `str \| None` | — | Path to USS stylesheet to link (e.g., 'Assets/UI/Styles.uss'). For link_stylesheet. |
| `filter_type` | `str \| None` | — | Filter UI assets by type: 'uxml', 'uss', 'PanelSettings', or omit for all. For list. |
| `page_size` | `int \| None` | — | Number of results per page (default 50). For list. |
| `page_number` | `int \| None` | — | Page number, 1-based (default 1). For list. |
| `element_name` | `str \| None` | — | Name of the visual element to modify (the 'name' attribute in UXML). For modify_visual_element. |
| `text` | `str \| None` | — | New text content for Label/Button elements. For modify_visual_element. |
| `add_classes` | `list[str] \| None` | — | USS class names to add to the element. For modify_visual_element. |
| `remove_classes` | `list[str] \| None` | — | USS class names to remove from the element. For modify_visual_element. |
| `toggle_classes` | `list[str] \| None` | — | USS class names to toggle on the element. For modify_visual_element. |
| `style` | `dict[str, Any] \| None` | — | Inline styles to set (e.g., {'backgroundColor': '#FF0000', 'fontSize': 24}). For modify_visual_element. |
| `enabled` | `bool \| None` | — | Set element enabled/disabled state. For modify_visual_element. |
| `visible` | `bool \| None` | — | Set element visibility (display: flex/none). For modify_visual_element. |
| `tooltip` | `str \| None` | — | Set element tooltip text. For modify_visual_element. |
## 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 -->
@@ -0,0 +1,8 @@
{
"label": "vfx",
"link": {
"type": "doc",
"id": "reference/tools/vfx/index"
},
"collapsed": true
}
+13
View File
@@ -0,0 +1,13 @@
---
title: "vfx tools"
sidebar_label: "vfx"
description: "MCP for Unity tools in the vfx group."
---
# `vfx` tools
Visual effects VFX Graph, shaders, procedural textures
- **[`manage_shader`](./manage_shader.md)** — Manages shader scripts in Unity (create, read, update, delete).
- **[`manage_texture`](./manage_texture.md)** — Procedural texture generation for Unity.
- **[`manage_vfx`](./manage_vfx.md)** — Manage Unity VFX components (ParticleSystem, VisualEffect, LineRenderer, TrailRenderer).
@@ -0,0 +1,35 @@
---
title: manage_shader
sidebar_label: manage_shader
description: "Manages shader scripts in Unity (create, read, update, delete)."
---
# `manage_shader`
> **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:** `vfx` &nbsp;·&nbsp; **Module:** `services.tools.manage_shader`
## Description
Manages shader scripts in Unity (create, read, update, delete). Read-only action: read. Modifying actions: create, update, delete.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'read', 'update', 'delete']` | yes | Perform CRUD operations on shader scripts. |
| `name` | `str` | yes | Shader name (no .cs extension) |
| `path` | `str` | yes | Asset path (default: "Assets/") |
| `contents` | `str \| None` | — | Shader code for 'create'/'update' |
## 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 -->
@@ -0,0 +1,48 @@
---
title: manage_texture
sidebar_label: manage_texture
description: "Procedural texture generation for Unity."
---
# `manage_texture`
> **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:** `vfx` &nbsp;·&nbsp; **Module:** `services.tools.manage_texture`
## Description
Procedural texture generation for Unity. Creates textures with solid fills, patterns (checkerboard, stripes, dots, grid, brick), gradients, and noise. Actions: create, modify, delete, create_sprite, apply_pattern, apply_gradient, apply_noise, set_import_settings
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `Literal['create', 'modify', 'delete', 'create_sprite', 'apply_pattern', 'apply_gradient', 'apply_noise', 'set_import_settings']` | yes | Action to perform. |
| `path` | `str \| None` | — | Output texture path (e.g., 'Assets/Textures/MyTexture.png') |
| `width` | `int \| None` | — | Texture width in pixels (default: 64) |
| `height` | `int \| None` | — | Texture height in pixels (default: 64) |
| `fill_color` | `list[int \| float] \| dict[str, int \| float] \| str \| None` | — | Fill color as [r, g, b] or [r, g, b, a] array, {r, g, b, a} object, or hex string. Accepts both 0-255 range (e.g., [255, 0, 0]) or 0.0-1.0 normalized range (e.g., [1.0, 0, 0]) |
| `pattern` | `Literal['checkerboard', 'stripes', 'stripes_h', 'stripes_v', 'stripes_diag', 'dots', 'grid', 'brick'] \| None` | — | Pattern type for apply_pattern action |
| `palette` | `list[list[int \| float]] \| str \| None` | — | Color palette as [[r,g,b,a], ...]. Accepts both 0-255 range or 0.0-1.0 normalized range |
| `pattern_size` | `int \| None` | — | Pattern cell size in pixels (default: 8) |
| `pixels` | `list[list[int]] \| str \| None` | — | Pixel data as JSON array of [r,g,b,a] values or base64 string |
| `image_path` | `str \| None` | — | Source image file path for create/create_sprite (PNG/JPG). |
| `gradient_type` | `Literal['linear', 'radial'] \| None` | — | Gradient type (default: linear) |
| `gradient_angle` | `float \| None` | — | Gradient angle in degrees for linear gradient (default: 0) |
| `noise_scale` | `float \| None` | — | Noise scale/frequency (default: 0.1) |
| `octaves` | `int \| None` | — | Number of noise octaves for detail (default: 1) |
| `set_pixels` | `dict[Any] \| None` | — | Region to modify: {x, y, width, height, color or pixels} |
| `as_sprite` | `dict \| bool \| None` | — | Configure as sprite: {pivot: [x,y], pixels_per_unit: 100} or true for defaults |
| `import_settings` | `dict[Any] \| None` | — | TextureImporter settings dict. Keys: texture_type (default/normal_map/sprite/etc), texture_shape (2d/cube), srgb (bool), alpha_source (none/from_input/from_gray_scale), alpha_is_transparency (bool), readable (bool), generate_mipmaps (bool), wrap_mode/wrap_mode_u/wrap_mode_v (repeat/clamp/mirror/mirror_once), filter_mode (point/bilinear/trilinear), aniso_level (0-16), max_texture_size (32-16384), compression (none/low_quality/normal_quality/high_quality), compression_quality (0-100), sprite_mode (single/multiple/polygon), sprite_pixels_per_unit, sprite_pivot, sprite_mesh_type (full_rect/tight), sprite_extrude (0-32) |
## 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 -->
@@ -0,0 +1,36 @@
---
title: manage_vfx
sidebar_label: manage_vfx
description: "Manage Unity VFX components (ParticleSystem, VisualEffect, LineRenderer, TrailRenderer)."
---
# `manage_vfx`
> **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:** `vfx` &nbsp;·&nbsp; **Module:** `services.tools.manage_vfx`
## Description
Manage Unity VFX components (ParticleSystem, VisualEffect, LineRenderer, TrailRenderer). Action prefixes: particle_*, vfx_*, line_*, trail_*. Action-specific parameters go in `properties` (keys match ManageVFX.cs).
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `action` | `str` | yes | Action to perform (prefix: particle_, vfx_, line_, trail_). |
| `target` | `str \| None` | — | Target GameObject (name/path/id). |
| `search_method` | `Literal['by_id', 'by_name', 'by_path', 'by_tag', 'by_layer'] \| None` | — | How to find the target GameObject. |
| `properties` | `dict[str, Any] \| str \| None` | — | Action-specific parameters (dict or JSON string). |
| `component_index` | `int \| None` | — | Zero-based index to select which component when multiple of the same type exist (e.g., multiple ParticleSystems). If omitted, targets the first instance. |
## 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 -->