Files

20 KiB
Executable File

Tool Reference

Generated from lib/tool-registry.js. The default core profile exposes 39 tools; the full profile exposes 106 tools.

Profile Summary

Profile Tool Count Purpose
core 39 Focused default surface for common editor automation.
full 106 All built-in tools, including destructive and low-level helpers.

Core Tools

capture_editor_screenshot, capture_preview_screenshot, capture_scene_screenshot, check_for_updates, clear_logs, create_scene, execute_editor_script, execute_javascript, execute_scene_script, get_build_status, get_editor_state, get_hierarchy, get_performance_snapshot, get_preview_mode, get_project_info, get_recent_logs, get_runtime_state, get_scene_info, get_script_diagnostic_context, get_selection, get_tool_catalog, inspect_asset, inspect_asset_dependencies, inspect_prefab, inspect_prefab_instance, list_assets, list_editor_windows, list_project_instructions, list_scenes, open_asset, open_scene, read_project_instruction, run_script_diagnostics, search_project_logs, select_asset, set_selection, validate_asset_dependencies, validate_prefab_references, validate_scene

Tools By Category

Animation

Tool Profiles Access Description
add_animation_clip full stateful Add an AnimationClip asset to a node Animation component.
list_animations full read-only [core] List Animation components in the active scene or under one node.
play_animation full stateful [core] Play an Animation component clip on a node.
stop_animation full stateful [core] Stop an Animation component clip on a node.

Assets

Tool Profiles Access Description
check_asset_ready full read-only [specialist] Check bounded AssetDB readiness and optionally a stable imported UUID/URL identity. Does not prove importer queue, script compilation, source bytes, or runtime loading completion.
create_scene core, full stateful [core] Create an empty scene or a copy of the active scene at an explicit assets path without opening an interactive save dialog.
delete_asset full mutating Delete an asset from asset-db by uuid, db url, or path.
inspect_asset core, full read-only [specialist] Inspect asset-db info, metadata, and serialized asset data by uuid or path. Prefer this when you need a precise structured asset read.
inspect_asset_dependencies core, full read-only [specialist] Inspect UUID-style dependencies referenced by a serialized Cocos asset.
list_assets core, full read-only [specialist] Query project assets from asset-db by pattern or asset type. Prefer this when you need exact asset discovery; otherwise use execute_javascript for broader automation.
list_scenes core, full read-only [specialist] List scene assets in the project. Prefer this when you need exact scene discovery before opening one; otherwise stay in execute_javascript for broader workflows.
open_asset core, full stateful [specialist] Open an asset inside Cocos Creator by uuid, db url, or path. Use this only when opening the asset itself is the explicit next step.
open_scene core, full stateful [specialist] Open a scene asset in Cocos Creator by uuid, db url, or path. Use this when scene switching is the explicit goal; otherwise keep execute_javascript as the main planning tool.
run_scene_asset full mutating Load a scene asset by uuid directly into the current runtime scene context.
select_asset core, full stateful [specialist] Select an asset in the Cocos editor. Use this when editor selection state matters; otherwise keep execute_javascript as the primary workflow.

Broadcast

Tool Profiles Access Description
broadcast_editor_message full stateful [core] Send or broadcast a Cocos editor message for advanced editor automation.

Build

Tool Profiles Access Description
get_build_status core, full read-only [specialist] Query Cocos build/preview status using known builder message variants.
get_preview_mode core, full read-only [specialist] Query the active Cocos Creator preview mode. Browser results use a same-host loopback url/localUrl and preserve Creator's reported LAN address as networkUrl.
open_build_panel full stateful [core] Open the Cocos build panel, defaulting to the builder panel id.
run_project_preview full stateful [core] Start Cocos Creator 3.8.x preview in browser, editor Game View, or simulator mode. Game View uses the native toolbar and does not toggle off an already running preview. Browser results use a same-host loopback url/localUrl and preserve Creator's reported LAN address as networkUrl.
save_current_scene full stateful [core] Save the currently open Cocos scene using available editor scene messages.
set_preview_mode full mutating [core] Switch Cocos Creator 3.8.x preview mode through the native toolbar, synchronizing its state and stopping Game View before switching away.

Camera

Tool Profiles Access Description
create_camera full stateful Create a Camera node in the active scene.
list_cameras full read-only [core] List Camera components in the active scene.
set_camera_properties full mutating Set selected Camera component properties.

Components

Tool Profiles Access Description
add_component full stateful Add a component to a node by component class name.
inspect_component full read-only [core] Inspect a component attached to a node.
invoke_component_method full mutating [core] Invoke a method on a component for runtime validation and test hooks.
list_components full read-only [core] List components attached to a scene node.
remove_component full mutating Remove a component from a node by name or index.
reset_component_property full mutating Reset or clear a component property by dot path.
set_component_property full mutating Set a component property by dot path using a JSON value.

Diagnostics

Tool Profiles Access Description
get_script_diagnostic_context core, full read-only [specialist] Run TypeScript diagnostics and attach source snippets for each error. This is a preferred specialist tool for compile-error triage before repair.
run_script_diagnostics core, full stateful [specialist] Run a TypeScript no-emit check for the current Cocos project and return parsed diagnostics. This is a preferred specialist tool for script errors when diagnostics are needed.
validate_asset_dependencies core, full read-only [specialist] Validate UUID-style dependencies for one asset or a project asset query.
validate_prefab_references core, full read-only [specialist] Validate prefab asset references by checking serialized UUID references against asset-db.
validate_scene core, full read-only [specialist] Run a compact validation pass over the active scene, runtime state, TypeScript diagnostics, and recent project log errors.

Events

Tool Profiles Access Description
bind_button_click_event full stateful [core] Bind a Cocos Button click event to a target node component method.
emit_node_event full mutating [core] Emit a custom event on a target scene node with an optional JSON payload.
list_button_click_events full read-only [core] List click event bindings on a Cocos Button component.
simulate_button_click full mutating [core] Simulate a Cocos Button click by emitting click events on the target button node.

Execution

Tool Profiles Access Description
execute_editor_script core, full mutating [compat] Execute JavaScript in the editor/browser context. Prefer execute_javascript with context="editor" as the main unified tool; use this when you specifically want the editor-only compatibility entrypoint.
execute_javascript core, full mutating [primary] Execute JavaScript in either the scene or editor context. Use context="scene" for live scene/runtime inspection and mutation, or context="editor" for Editor APIs, asset-db workflows, MCP orchestration, local filesystem access, and higher-level automation. Prefer this as the main flexible tool when many narrow tools would be noisy.

Files

Tool Profiles Access Description
exists full read-only [core] Check whether a project file or directory exists.
get_file_snippet full read-only [core] Read a focused snippet around a file line number.
list_directory full read-only [core] List files and directories inside a project directory.
read_file full read-only [core] Read a file from the Cocos project.
refresh_assets full stateful [core] Best-effort asset database refresh for a file or the assets root.
replace_in_file full mutating [core] Replace text in a file, useful for script auto-fix loops.
search_files full read-only [core] Search project files by simple wildcard pattern.
write_file full mutating [core] Write or overwrite a file in the Cocos project.

Input

Tool Profiles Access Description
simulate_key_combo full mutating [core] Send a low-level Electron modified key press such as Ctrl+S or Cmd+P.
simulate_key_press full mutating [core] Send a low-level Electron key press to the editor, preview, or simulator window.
simulate_mouse_click full mutating [core] Send a low-level Electron mouse click to the editor, preview, or simulator window.
simulate_mouse_drag full mutating [core] Send an Electron mouse drag. Legacy steps remain supported; opt into frame-paced timing for bounded, cancellable, idempotent movement across target-renderer frames. Frame delivery is not gameplay acceptance.
simulate_preview_input full mutating [core] Preview/simulator input wrapper. Defaults to click or key press; drag mode also supports frame-paced timing and same-tool status/cancel receipts. Renderer input delivery is not game acceptance.

Instructions

Tool Profiles Access Description
create_cocos_mcp_project_skill full stateful [core] Create the recommended Funplay Cocos MCP workflow Skill for a supported client (defaults to Codex).
create_project_skill full stateful [core] Create a project Skill for a supported client. Defaults to Codex under .agents/skills.
list_project_instructions core, full read-only [specialist] List project AI instruction files and Skills for a supported client (defaults to Codex).
read_project_instruction core, full read-only [specialist] Read a project AI instruction file such as AGENTS.md, CLAUDE.md, or a project SKILL.md.
write_project_instruction full mutating [core] Create or update a project AI instruction file inside the Cocos project.

Logs

Tool Profiles Access Description
clear_logs core, full mutating [specialist] Clear in-memory MCP logs and, only with explicit confirmation, truncate common project log files.
get_recent_logs core, full read-only [specialist] Return recent MCP runtime logs, recent tool interactions, and tails of common project log files.
search_project_logs core, full read-only [specialist] Search common Cocos project log files for a string or regular expression.

Other

Tool Profiles Access Description
get_performance_snapshot core, full read-only [specialist] Return edit-scene scale and performance-oriented counters such as node/component counts, UI counts, depth, memory, and warnings. Its director counters are not Game View preview state.
list_editor_windows core, full read-only [specialist] List available Electron windows so screenshots or input-targeting can choose the correct window. Use this when window targeting is the explicit problem.

Prefabs

Tool Profiles Access Description
apply_prefab_instance full stateful [core] Apply a scene prefab instance back to its associated prefab asset using the Cocos editor scene apply-prefab message.
create_prefab_from_node full stateful [core] Create a prefab asset from an existing scene node using scene-process serialization and asset-db persistence. The cloned hierarchy is normalized to UI_2D without modifying the source nodes. Use this instead of raw scene:create-prefab on Cocos Creator 3.8.x.
create_prefab_instance full stateful [core] Create and verify a linked prefab instance in the editor hierarchy using Cocos scene create-node when available.
duplicate_prefab full stateful [core] Create a new prefab asset by duplicating an existing prefab file without copying its .meta UUID.
edit_prefab_json full stateful [core] Edit a prefab JSON file by JSON path assignment or literal search/replace, then validate references.
inspect_prefab core, full read-only [specialist] Inspect a prefab asset, its metadata, serialized file path, and UUID-like asset references.
inspect_prefab_instance core, full read-only [specialist] Inspect whether a scene node is linked to a prefab instance and return prefab metadata when available.
instantiate_prefab full stateful Instantiate a prefab into the active scene by prefab uuid.
list_prefabs full read-only [core] List prefab assets in the project.
revert_prefab_instance full stateful [core] Revert a scene prefab instance from its associated prefab asset using available Cocos editor prefab revert messages.

Preferences

Tool Profiles Access Description
get_editor_preference full read-only [core] Read a Cocos editor preference through Editor.Profile when available.
set_editor_preference full mutating [core] Write a Cocos editor preference through Editor.Profile when available.

Project

Tool Profiles Access Description
get_editor_state core, full read-only [specialist] Return a structured editor-state snapshot including project info, runtime server status, current selection, and visible Electron windows. Prefer this when you want one compact editor summary.
get_project_info core, full read-only [specialist] Return the active Cocos project path, version, and MCP server configuration. Prefer this for a fast structured project summary; use execute_javascript when you need to inspect and act in one step.
get_tool_catalog core, full read-only [specialist] Return every built-in MCP tool with profile, category, and current exposure state. Use this before changing custom tool exposure.

Runtime

Tool Profiles Access Description
get_runtime_state core, full read-only [specialist] Return the editor Game View preview running/paused state and toolbar synchronization status, not edit-scene director counters. Does not inspect browser or simulator runtime state.
pause_runtime full stateful [core] Pause an active editor Game View preview through the native toolbar. Idempotent; does not pause the edit-scene director, browser, or simulator.
resume_runtime full stateful [core] Resume a paused editor Game View preview through the native toolbar. Idempotent; requires a running Game View preview.
set_time_scale full mutating [core] Set the edit-scene Cocos scheduler time scale. Does not change the separate Game View preview runtime.

Scene

Tool Profiles Access Description
create_node full stateful Create a new node under the active scene or a specified parent path.
delete_node full mutating Delete a node by path, uuid, or name.
execute_scene_script core, full mutating [compat] Execute JavaScript in the active Cocos scene context. Prefer execute_javascript with context="scene" as the main unified tool; use this when you specifically want the scene-only compatibility entrypoint.
find_nodes full read-only [core] Find scene nodes by exact name, partial path, or component type.
get_hierarchy core, full read-only [specialist] Return a structured hierarchy tree from the active scene or a specific node path. Prefer execute_javascript for broader reasoning or repair; use this when you want a predictable hierarchy snapshot.
get_scene_info core, full read-only [specialist] Return a structured summary of the active Cocos scene. Prefer execute_javascript for multi-step inspection or mutation; use this when you specifically want a compact scene snapshot.
inspect_node full read-only [core] Inspect a specific node by path, uuid, or name.
set_node_transform full mutating Update node position, rotation, scale, or active state.

Screenshots

Tool Profiles Access Description
capture_desktop_screenshot full read-only [core] Capture a screenshot from the local desktop and return it as an MCP image payload.
capture_editor_screenshot core, full read-only [specialist] Capture the focused Cocos Creator editor window and return it as an MCP image payload. Prefer screenshot tools only when visual verification is explicitly needed.
capture_game_screenshot full read-only [core] Capture the visible Cocos Game View or GameCanvas from the selected window. Reports an error when no game viewport is visible.
capture_preview_screenshot core, full read-only [specialist] Capture the preview or simulator window as an MCP image payload. Prefer this only when you need visual proof of game or preview output.
capture_scene_screenshot core, full read-only [specialist] Capture the Scene panel region from the editor window with panel-level cropping when available. Prefer this only for visual validation of scene-side results.

Selection

Tool Profiles Access Description
get_editor_selection full read-only [compat] Return the current node and asset selection in the Cocos editor. Prefer get_selection as the primary structured selection read tool.
get_selection core, full read-only [specialist] Return the current editor selection in a compact structured form. Prefer this when selection state matters for the next action.
set_selection core, full mutating [specialist] Set or clear the current editor selection for an asset or node. Use this when downstream editor workflows depend on selection state.

Ui

Tool Profiles Access Description
create_button full stateful Create a UI Button node with child Label.
create_canvas full stateful Create a Cocos Canvas node with UITransform.
create_label full stateful Create a UI Label node under a parent.
create_sprite full stateful Create a UI Sprite node, optionally assigning a SpriteFrame asset uuid.

Updates

Tool Profiles Access Description
check_for_updates core, full read-only [specialist] Check the latest Funplay Cocos MCP GitHub release and compare it with the installed extension version.