chore: freeze v1.1.3 filing submission build (60 levels, full-screen safe layout)

This commit is contained in:
fannyxl committed 2026-11-25 23:14:45 +08:00
commit 96c19dca82
174 files changed
+37935

No files matched your search

@@ -0,0 +1,5 @@
# Funplay MCP for Cocos
面向 Cocos Creator 编辑器的高级 MCP Server,支持 `execute_javascript`、Prompts/Resources、截图、资源依赖校验、工具 Profile、客户端一键配置、按 Creator 版本管理的全局安装和编辑器自动化。
让 Claude Code、Cursor、Codex、VS Code Copilot、Trae、Kiro、Qoder、Kimi Code、OpenCode、CodeBuddy IDE 等 AI 编程助手直接连接正在运行的 Cocos Creator 项目,读取真实编辑器上下文,并辅助完成场景检查、资源分析、日志排查和常用开发工作流。
@@ -0,0 +1,5 @@
# Funplay MCP for Cocos
The Most Advanced MCP Server for Cocos Creator Editor with `execute_javascript`, prompts/resources, screenshots, asset dependency validation, tool profiles, one-click client configuration, version-aware global installation, and editor automation.
Connect AI coding assistants such as Claude Code, Cursor, Codex, VS Code Copilot, Trae, Kiro, Qoder, Kimi Code, OpenCode, and CodeBuddy IDE directly to your running Cocos Creator project, with real editor context for scene inspection, asset analysis, log debugging, and common development workflows.
@@ -0,0 +1,109 @@
# Funplay MCP for Cocos
## 【功能介绍】
Funplay MCP for Cocos 是一款面向 **Cocos Creator 3.8 及以上版本**的开源 AI 开发插件。它将 MCP Server 直接嵌入 Cocos Creator 编辑器,让 Claude Code、Cursor、Codex、VS Code Copilot、Trae、Kiro、Qoder、Kimi Code、OpenCode、CodeBuddy 等支持 MCP 的 AI 编程助手连接当前项目,读取真实编辑器上下文并执行开发工作流。
与只能分析项目文件的普通 AI 助手不同,本插件能够访问当前打开的场景、节点层级、组件、资源、Prefab、日志、脚本诊断、编辑器状态和截图。AI 可以基于项目的实际状态进行分析、修改和验证,减少开发者在编辑器、终端和 AI 客户端之间反复切换。
### 核心能力
- **统一 JavaScript 执行工具**:通过 `execute_javascript` 在场景或编辑器上下文中执行组合操作,适合创建 UI、调整节点、检查运行状态和处理重复性编辑器工作。
- **106 个内置工具**:覆盖场景与节点、组件、资源与 Prefab、文件、日志、脚本诊断、截图、运行状态、构建、预览、事件绑定和输入模拟等常见工作流。
- **真实编辑器上下文**:读取当前项目、活动场景、节点层级、选中对象、资源信息、脚本错误、编辑器日志和最近 MCP 调用记录。
- **场景与资源自动化**:支持创建和打开场景、检查和修改节点及组件、创建 Prefab、分析资源依赖、验证 Prefab 引用并刷新资源数据库。
- **预览与可视化验证**:支持浏览器预览、编辑器 Game View 和模拟器模式,可获取浏览器预览地址,并通过编辑器、场景或预览截图验证结果。
- **一键配置 AI 客户端**:可在插件面板中为 Claude Code、Cursor、Codex、VS Code、Trae、Kiro、Qoder、Kimi Code、OpenCode、CodeBuddy IDE(4.0+)生成或写入 MCP 配置;支持 Skills 的客户端还可一键安装缺少的内置工作流和 UI Skills。
- **灵活的工具 Profile**:默认 `core` Profile 提供 39 个高频工具;需要完整能力时可切换到 `full`,也可以按分类或工具名称自定义暴露范围。
- **多窗口管理面板**:提供风格统一的 MCP Server、Tool Exposure、MCP Settings、Project Skills 窗口,用于管理服务、工具范围、客户端配置和 Skills,不再附带输出或日志查看区域。
- **中英文界面**:菜单和窗口标题跟随 Cocos Creator;窗口内控件与状态提示可跟随 Creator,也可按项目手动指定中文或英文。
- **自动更新与一键更新**:可检查 GitHub Release 新版本,下载更新包并校验 SHA256;普通安装支持面板内更新。
- **一次安装,所有项目可用**:可把经过 SHA256 校验的 Release 安装到当前 Creator 版本管理的全局扩展目录,由该版本打开或新建的项目都能自动加载。
- **本地运行与安全边界**:服务默认只监听 `127.0.0.1`,文件工具限制在当前项目目录内,`execute_javascript` 默认启用高风险操作检查。
- **开放兼容**:同时提供 MCP Tools、Resources 和 Prompts,兼容支持 Streamable HTTP 或 stdio MCP 配置的客户端。
### 适用场景
- 让 AI 快速理解已有 Cocos 项目的场景、资源和代码结构。
- 创建或调整 UI、节点、组件、Prefab 和常用编辑器内容。
- 排查 TypeScript 错误、编辑器日志、资源依赖和 Prefab 引用问题。
- 启动并切换预览模式,通过截图或浏览器地址验证实际效果。
- 为团队建立可复用的 AI 项目指令、工具 Profile 和自动化工作流。
### 兼容性与说明
- 最低支持版本:**Cocos Creator 3.8**。
- 本插件仅在编辑器中运行,不会向最终游戏包添加运行时代码。
- AI 客户端及其模型服务需要由用户自行安装和配置,本插件不包含第三方 AI 服务。
- 新项目使用稳定的项目独立端口,已有固定端口配置保持不变。面板显示实际地址;若端口被占用而临时回退,须先固定端口或解决冲突再一键配置客户端。
- 具备修改能力的工具会直接操作当前项目,建议使用 Git 或其他版本管理工具,并在重要操作前确认改动范围。
## 【使用教程】
1. **安装插件**
从 Cocos Store 将 Funplay MCP for Cocos 安装到目标项目,然后使用 Cocos Creator 3.8 或更高版本打开该项目。
2. **为所有项目启用(推荐)**
打开 `Funplay > MCP Settings`,在“所有项目”区域点击“为所有项目安装”。安装包通过 SHA256 校验后写入当前 Creator 版本管理的全局目录,并让 Creator 扫描和注册它;之后由该版本打开或新建的项目都可以自动加载。当前项目副本会继续运行,重新打开项目后再切换到全局副本;如出现重复安装提示,请先在干净项目中确认全局副本,再移除或禁用项目副本。同时使用多个 Creator 版本时,每个版本需要分别执行一次。
3. **打开控制面板**
在 Cocos Creator 顶部菜单中选择:
`Funplay > MCP Server`
4. **启动 MCP Server**
在面板中确认服务状态并点击启动。默认地址为:
`http://127.0.0.1:8765/`
如果默认端口被占用,请以面板显示的实际运行端口为准。
5. **选择并配置 AI 客户端**
在客户端配置区域选择对应客户端,然后点击一键配置;支持 Skills 的客户端可选择“配置 + Skills”。CodeBuddy IDE 需 4.0 或更高版本,配置写入 Cocos 项目根目录的 `.mcp.json`,Skills 安装到 `.codebuddy/skills`;请在 CodeBuddy 中打开同一项目目录,并按提示启用或批准服务器。也可以复制面板生成的配置,手动添加到其他支持 MCP 的客户端。
6. **确认连接**
回到 AI 客户端,确认 `funplay-cocos-mcp` 已连接并能看到工具列表。首次使用可以先调用 `get_project_info`、`get_scene_info` 或 `get_hierarchy` 检查项目和场景信息。
7. **开始使用**
例如可以向 AI 提出:
> 检查当前场景层级和脚本错误,并告诉我最需要处理的问题。
> 在当前场景创建一个包含标题、输入框和按钮的登录界面,完成后截图验证。
> 切换到浏览器预览模式,启动当前场景并返回预览地址。
8. **按需调整工具范围**
默认 `core` Profile 适合常用检查和开发任务。如果需要文件写入、完整场景编辑、预览切换等更多能力,可在 `Funplay > Tool Exposure` 中切换到 `full` 或创建自定义 Profile。
9. **检查更新**
在 MCP Server 面板中可以检查新版本。普通商店安装可使用一键更新;Git worktree 或软链接开发安装请继续使用 Git 更新,避免覆盖开发目录。
## 【联系方式】
**开源仓库**
https://github.com/FunplayAI/funplay-cocos-mcp
**问题反馈与功能建议**
https://github.com/FunplayAI/funplay-cocos-mcp/issues
**作者**
Funplay / FunplayAI
**联系邮箱**
3256714392@qq.com
本项目采用 MIT 开源协议。欢迎通过 GitHub Issue 提交兼容性问题、功能建议和使用反馈。
@@ -0,0 +1,109 @@
# Funplay MCP for Cocos
## 【Feature Introduction】
Funplay MCP for Cocos is an open-source AI development extension for **Cocos Creator 3.8 and later**. It embeds an MCP Server directly in the Cocos Creator editor, allowing MCP-compatible coding assistants such as Claude Code, Cursor, Codex, VS Code Copilot, Trae, Kiro, Qoder, Kimi Code, OpenCode, and CodeBuddy to connect to the active project, read real editor context, and execute development workflows.
Unlike an assistant that can only analyze project files, Funplay MCP for Cocos can inspect the active scene, node hierarchy, components, assets, prefabs, logs, script diagnostics, editor state, and screenshots. This lets AI work from the project's actual state and helps reduce repeated switching between the editor, terminal, and AI client.
### Key Features
- **Unified JavaScript execution**: Use `execute_javascript` in scene or editor context to combine operations such as creating UI, editing nodes, inspecting runtime state, and automating repetitive editor tasks.
- **106 built-in tools**: Covers scenes and nodes, components, assets and prefabs, files, logs, script diagnostics, screenshots, runtime state, builds, previews, event binding, and input simulation.
- **Live editor context**: Read the current project, active scene, hierarchy, selection, asset metadata, script errors, editor logs, and recent MCP activity.
- **Scene and asset automation**: Create and open scenes, inspect or edit nodes and components, create prefabs, analyze asset dependencies, validate prefab references, and refresh the asset database.
- **Preview and visual verification**: Use Browser Preview, Editor Game View, or Simulator Preview; retrieve the browser preview URL and verify results with editor, scene, or preview screenshots.
- **One-click AI client setup**: Generate or write MCP configuration for Claude Code, Cursor, Codex, VS Code, Trae, Kiro, Qoder, Kimi Code, OpenCode, and CodeBuddy IDE (4.0+) from the extension panel. Supported Skills clients can also install missing built-in workflow and UI Skills in one action.
- **Flexible tool profiles**: The default `core` profile exposes 39 high-signal tools. Switch to `full` for all tools, or create a custom profile by category or individual tool.
- **Focused management windows**: Consistent MCP Server, Tool Exposure, MCP Settings, and Project Skills windows keep service controls, tool exposure, client setup, and skill management organized, without output or log-viewing panels.
- **English and Chinese UI**: Menus and native panel titles follow Cocos Creator; panel controls and status messages can follow Creator or use a project-specific language override.
- **Update checks and one-click updates**: Detect new GitHub Releases, download the extension package, and verify its SHA256 checksum before installation.
- **Install once for every project**: Install a SHA256-verified release in the active Creator version's managed global extension directory so projects opened with that version load it automatically.
- **Local operation and guardrails**: The server listens on `127.0.0.1` by default, file tools stay inside the active project, and risky `execute_javascript` patterns are checked by default.
- **Open MCP compatibility**: Provides MCP Tools, Resources, and Prompts for clients using Streamable HTTP or a stdio MCP configuration.
### Typical Use Cases
- Help AI understand the scenes, assets, and code structure of an existing Cocos project.
- Create or adjust UI, nodes, components, prefabs, and common editor content.
- Diagnose TypeScript errors, editor logs, asset dependencies, and broken prefab references.
- Start and switch preview modes, then verify the result through screenshots or a browser URL.
- Build reusable project instructions, tool profiles, and AI workflows for a team.
### Compatibility and Notes
- Minimum supported version: **Cocos Creator 3.8**.
- This is an editor-only extension and does not add runtime code to the final game build.
- AI clients and model services must be installed and configured separately; no third-party AI service is bundled with the extension.
- New projects use a stable project-derived port; existing fixed endpoints remain unchanged. The panel shows the active address. Pin a temporary fallback port or resolve the conflict before configuring a client.
- Tools with write or mutation capabilities operate directly on the current project. Use Git or another version control system and review the intended scope before major changes.
## 【Usage Guide】
1. **Install the extension**
Install Funplay MCP for Cocos from Cocos Store into the target project, then open the project with Cocos Creator 3.8 or later.
2. **Enable it for all projects (recommended)**
Open `Funplay > MCP Settings` and click **Install for All Projects** in the All Projects section. The package is verified with SHA256 before it is written to the active Creator version's managed global directory, then Creator scans and registers it. Projects subsequently opened or created with that Creator version load it automatically. The current project copy stays active until the project is reopened; if a duplicate-install warning appears, verify the global copy in a clean project before removing or disabling the project copy. Repeat once for each Creator version you use.
3. **Open the control panel**
From the Cocos Creator top menu, select:
`Funplay > MCP Server`
4. **Start the MCP Server**
Check the server status in the panel and start it. The default endpoint is:
`http://127.0.0.1:8765/`
If that port is already in use, use the active port displayed in the panel.
5. **Select and configure an AI client**
Select your client in the configuration section, then use one-click setup or **Configure + Skills** for supported Skills clients. CodeBuddy IDE requires version 4.0 or later: MCP setup uses the Cocos project's `.mcp.json`, and Skills use `.codebuddy/skills`. Open that same project folder in CodeBuddy and enable/approve the server when prompted. You can also copy the generated configuration into another MCP-compatible client manually.
6. **Confirm the connection**
Return to the AI client and confirm that `funplay-cocos-mcp` is connected and its tools are available. For a first test, call `get_project_info`, `get_scene_info`, or `get_hierarchy` to inspect the active project and scene.
7. **Start working**
Example requests:
> Inspect the current scene hierarchy and script errors, then identify the most important issues.
> Create a login UI with a title, input fields, and buttons in the active scene, then capture a screenshot to verify it.
> Switch to Browser Preview, launch the active scene, and return the preview URL.
8. **Adjust tool exposure when needed**
The default `core` profile is suitable for common inspection and development tasks. For file writes, complete scene editing, preview switching, and other advanced operations, open `Funplay > Tool Exposure` and select `full` or create a custom profile.
9. **Check for updates**
Use the MCP Server panel to check for a new release. Standard Store installations can use one-click update. Git worktree or symlink development installations should continue using Git so the updater does not overwrite development files.
## 【Contact】
**Open-source repository**
https://github.com/FunplayAI/funplay-cocos-mcp
**Issue reports and feature requests**
https://github.com/FunplayAI/funplay-cocos-mcp/issues
**Author**
Funplay / FunplayAI
**Contact email**
3256714392@qq.com
This project is available under the MIT License. Compatibility reports, feature requests, and usage feedback are welcome through GitHub Issues.
@@ -0,0 +1,159 @@
# Project isolation, Skills, and workflows
## 多项目与迁移
- 新项目按项目路径生成稳定端口,并使用 `cocos-<project>-<hash>` 配置名称。同名目录位于不同路径时也使用不同名称;端口哈希仍可能冲突,面板会明确显示回退状态。
- 已有 `funplay-cocos-mcp.config.json` 保留固定端口。点击“使用项目独立端口”可以主动切换;“固定当前端口”可保存当前实际端口。切换后需重新配置客户端。
- 临时回退端口不会被一键配置写入客户端。先解决冲突或固定端口,避免重启后指向错误项目。
- 一键配置保留其他 MCP 配置。只有当前编辑器正在运行、旧 `funplay_cocos` 条目准确指向当前端口且仍是工具生成的简单格式时,才会迁移旧条目;其他旧条目保留供人工检查。手动改过地址的项目条目不会被静默覆盖。
- Claude Code 使用 `~/.claude.json` 的 `projects[Git 仓库根目录].mcpServers`,不是所有项目共享的顶层条目。没有 Git 仓库时使用 Cocos 项目目录。这里的 Claude Code 配置不是 Claude Desktop 配置。
- Trae 写入 `<Cocos 项目>/.trae/mcp.json`,与 `.trae/skills` 使用同一个项目根目录。请在 Trae 中打开此 Cocos 项目,并在“设置 > MCP”启用“项目级 MCP”。旧的用户目录 `.trae/mcp.json` 不会被自动修改或迁移。
- Antigravity 的一键配置在当前 Cocos 项目的 `.agents/mcp_config.json` 中写入项目专属 `serverUrl`,并保留其他服务器及已有配置项。请在 Antigravity 中打开此项目并重载 MCP 配置。[Antigravity MCP 文档](https://antigravity.google/docs/mcp/)
- Pi 1.0+ 的一键配置在当前 Cocos 项目的 `.pi/mcp.json` 中保存 Streamable HTTP 地址。从 Cocos 项目目录启动 `pi`,按提示信任项目后即可加载 MCP 和 `.agents/skills`。已信任的会话可执行 `/reload` 再用 `/mcp` 查看状态。[Pi MCP 文档](https://docs.pi.dev/latest/mcp) · [Pi Skills 文档](https://docs.pi.dev/latest/skills)
- CodeBuddy 使用 IDE 4.0 起支持的 `<Cocos 项目>/.mcp.json`,不写 CLI 或旧编辑器插件的全局配置。请在 CodeBuddy 中打开该 Cocos 项目目录,并按客户端提示启用或批准服务器;不会自动放宽 MCP 审批设置。
- DeepSeek Harness(DSH)生成独立的 `<Cocos 项目>/.dsh/funplay-cocos-mcp.patch.json` Cordis 覆盖层,以 JSON(有效 YAML)格式配置官方 `@deepseek-ai/dsh-mcp-client` 的 `streamable-http` 连接。不会修改全局/profile YAML、安装依赖或改变审批设置。**文件不会自动加载**:请在 Cocos 项目目录运行面板显示的 `dsh web --patch '<绝对路径>'`,或给原启动命令追加相同 `--patch` 参数。配置状态表示文件已生成,不代表 DSH 已连接;同一 DSH Host 加载的服务器可被该 Host 的其他会话看到,不应把项目覆盖层当成会话权限隔离。
## Client-specific managed Skills
Open **Funplay > Project Skills**, choose a client, then install either built-in Skill. The MCP Server dashboard checks the selected client's managed directory. Unsupported clients do not show an install/update notice.
The dashboard's **Configure + Skills** action configures the selected MCP client and installs any missing built-in Skills. Existing Skills are kept, including old versions, legacy-path installs and local edits; use Project Skills to review, back up and update them. If configuration succeeds but a Skill cannot be installed, the dashboard reports partial completion instead of claiming the whole setup succeeded.
All management pages share aligned controls, lightweight sections, and responsive layouts. Extension update and global-install controls are in **Settings**. Project Skills hides unavailable actions and collapses file/backup details. Recent Activity preserves each result's field order, nested objects, array items, and scalar values instead of flattening six selected fields. Branches and JSON disclosures retain their expanded state across refreshes. Preview limits are 200 nodes, 6 nested levels, 24 keys per object, 12 items per array, 800 characters per string, and approximately 16,000 total characters; truncation is marked and sensitive fields/file bodies are omitted. Clear removes only MCP interaction history without clearing runtime logs. Output sections and the standalone Activity/log-viewing window are removed. Successful actions show a short, auto-dismissed notice; failures remain visible until dismissed. Diagnostic logs and MCP interaction summaries remain available through the existing MCP tools/resources.
Script cards separate the execution summary, scoped console logs, and return value. `execute_javascript` and both compatibility aliases inject a per-invocation `console` with `log/info/warn/error/debug` capture; `run(env)` and module-export functions also receive `env.console`. Logs before a thrown error survive scene IPC. Capture stops when the script settles and never patches the global console, so concurrent/nested calls, unrelated project logs, separately required modules, and later background callbacks cannot contaminate another call. Console forwarding is unchanged. Capture retains up to 50 entries, 1,000 characters per message, and about 20,000 characters per call, with redaction and an explicit `logsOmitted` count. Protocol responses keep their existing `data` and add optional `execution: { context, durationMs, logs, logsOmitted }` metadata, also on script error envelopes.
**Settings > Console Logs > Print MCP logs** controls only the extension and HTTP server's Cocos console printing, including warnings and errors. It defaults on and is saved as `enableConsoleLogging` in the project config. Changes apply immediately without restarting MCP, disconnecting clients, clearing Recent Activity/internal diagnostics, or muting project-script logs. A saved off setting also suppresses startup printing.
| Client | Managed project directory |
| --- | --- |
| Codex | `.agents/skills` |
| Claude Code | `.claude/skills` |
| Cursor | `.cursor/skills` |
| VS Code / Copilot | `.github/skills` |
| Trae | `.trae/skills` |
| Antigravity | `.agents/skills` (shared with Codex) |
| Pi | `.agents/skills` (shared with Codex and Antigravity) |
| Kiro | `.kiro/skills` |
| Qoder | `.qoder/skills` |
| Kimi Code | `<nearest Git root>/.kimi-code/skills` (project directory when no Git root exists) |
| OpenCode | `.opencode/skills` |
| CodeBuddy | `.codebuddy/skills` |
| DeepSeek Harness (DSH) | `<nearest Git root>/.dsh/skills` (project directory when no Git root exists) |
The manager checks these **managed project directories**, not every user-level or cross-client compatibility directory an agent may also discover. It does not change global Skills, agent rules, or user-authored `AGENTS.md` / `CLAUDE.md` files. Open the AI client at the relevant project/Git root so it can discover the files.
Client paths were checked against the official [Codex](https://learn.chatgpt.com/docs/build-skills#where-codex-loads-local-skills), [Claude Code](https://code.claude.com/docs/en/skills#where-skills-live), [Cursor](https://cursor.com/docs/skills), [VS Code](https://code.visualstudio.com/docs/agent-customization/agent-skills), [Trae](https://docs.trae.cn/ide_skills), [Kiro](https://kiro.dev/docs/skills/), [Qoder](https://docs.qoder.com/cli/Skills), [Kimi Code](https://moonshotai.github.io/kimi-code/en/customization/skills.html#skill-locations), [OpenCode](https://opencode.ai/docs/skills), and [CodeBuddy](https://www.codebuddy.cn/docs/ide/Features/Skills) documentation. CodeBuddy's project MCP location follows its [official IDE release notes](https://intl.cloud.tencent.com/zh/document/product/1256/77264); Trae's location and required Project MCP switch follow its [project MCP guide](https://docs.trae.cn/ide_add-mcp-servers).
DSH's launch overlay and Skills locations follow its official [CLI reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/reference/README.md), [MCP client](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.md), and [filesystem Skills provider](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/skill/skill-filesystem/README.md). DSH is in developer preview; this integration targets the official launcher rather than guessing third-party desktop configuration paths. A dedicated overlay must remain a single JSON `insert` containing this project's MCP row. Malformed or unrelated content, duplicate keys, disabled entries and manually repointed endpoints are not overwritten. Custom HTTP headers and timeouts are preserved when an owned endpoint changes. DSH Skills follow the Git root, so projects in the same repository share the managed copies and backups.
### Legacy Codex and Antigravity Skills
When a built-in Skill is absent from `.agents/skills`, the manager looks for it in `.codex/skills` for Codex and `.agent/skills` for Antigravity. Updating backs up the old content, retains the original file, and installs the current template in `.agents/skills`. Modified content requires explicit confirmation. Existing backups from the legacy directory are available to restore. Custom Skills can be moved manually. [Antigravity Skills documentation](https://antigravity.google/docs/skills/)
New backups are stored alongside the managed Skills directory, under `skill-backups/<skill-name>/`. Codex, Antigravity, and Pi share the managed copies and backups under `.agents/` in the same project.
### Built-in skill references
Both built-ins now route from a concise `SKILL.md` to conditional references, instead of loading all specialist guidance on every task:
- `funplay-cocos-mcp-workflow/references/project-readiness.md`: exact asset identity, separate import/compile/preview checks, and persistence.
- `funplay-cocos-ui-composition/references/image-to-prefab.md` covers turning a full design image into editable Cocos prefabs, including asset splitting, shared navigation, and region-by-region fidelity acceptance against actual preview captures.
- `funplay-cocos-ui-composition/references/layout-and-adaptation.md`: design baselines, layout ownership, scrolling, and explicitly requested safe-area changes.
- `references/sprites-and-importers.md`, `references/text-and-localization.md`, and `references/input-and-validation.md` in the UI Skill: nine-slice/importers, font/localization checks, and real input/visual validation respectively.
Image generation is optional for the image-to-prefab workflow. The Cocos extension imports assets, builds the prefab, and captures the preview. If a background or icon needs to be created from scratch, use the AI client's available image tools or supply the artwork.
The UI guidance preserves existing project composition and does not proactively introduce SafeArea containers, adaptation scripts, extra margins, or duplicate insets. New adaptation requires an explicit request or a demonstrated overlap confirmed with the user.
Managed metadata tracks hashes for `SKILL.md` and each known reference. A missing/older reference prompts an update even when the entrypoint is current. Modified managed files require a confirmed backup update; an unowned conflicting reference is never overwritten, even with confirmation. Unrelated files are retained. Backups keep their existing `.md` entrypoint and add a `.md.files.json` companion for references and metadata; keep both files together for bundle restore. Legacy backups without a companion restore only the entrypoint. Each file write checks its read snapshot, but the bundle is not a cross-file filesystem transaction; a failed write must be reviewed before retrying.
## Asset Database readiness
Enable the Full profile (or explicitly expose `check_asset_ready` in a custom profile). Example tool arguments:
```json
{"target":"db://assets/ui/Main.prefab","waitMs":1500,"pollIntervalMs":100}
```
This read-only check uses native `query-ready`, asset-info, UUID, and URL queries. An exact target needs imported metadata, matching UUID/URL round trips, and two consecutive stable observations. Omitting `target` checks only database query readiness. `waitMs` is bounded to 0–10,000 ms; zero requests one bounded observation and cannot establish stable readiness. Busy, missing, importing, identity mismatch, timeout, unavailable, and unknown results are not success. No refresh or mutation is retried by this tool.
`ready: true` is **not** proof that the importer queue is empty, source bytes are current, TypeScript compiled, or the runtime loaded the new asset. Check script diagnostics, exact persisted bindings, preview errors and runtime behavior separately. Refresh only the changed source when needed.
## Screenshot-calibrated mouse input
1. Capture the target with an editor/scene/game/preview screenshot tool; inspect the returned native image and `data.geometry`.
2. Use its `captureId` with `coordinateSpace: "image-pixels"`. Coordinates are measured in the **exact returned PNG**, from its top-left corner, not a resized chat preview or a reference design image.
3. Read back the resulting state or capture another screenshot to verify the requested action.
Example click arguments (replace the ID and coordinates with the actual capture):
```json
{"coordinateSpace":"image-pixels","captureId":"capture_from_the_response","x":420,"y":260}
```
Supported by `simulate_mouse_click`, `simulate_mouse_drag`, and mouse actions of `simulate_preview_input`. Drag uses `startX/startY/endX/endY` in the same PNG. `windowId` can select an exact Electron window for capture and legacy input; a missing explicit target never falls back to a different window. Calibrated input targets the receipt's original window/project and does not require repeating its window/panel selectors.
Metadata includes actual encoded image dimensions, viewport DPR/zoom, crop origin, and per-axis pixel-to-window scale. Receipts expire after 60 seconds, are bounded to 32 entries, and disappear when the extension reloads. Both endpoints are validated; hidden/destroyed windows, viewport/zoom/crop changes, renderer/canvas replacement, and observed editor scene changes require recapture. Scene identity and observable geometry are checked, not every runtime business-state change: `runtimeContentVerified` remains false, and cross-origin frame reloads may not be observable.
Successful input reports `events_submitted` with `businessOutcomeVerified: false`. Failure reports `INPUT_NOT_SENT` or `INPUT_OUTCOME_UNKNOWN`; after a partial dispatch, the extension attempts a mouse-button release but never replays the action. Inspect state before retrying an uncertain outcome. Synthetic events are not proof of Button hit testing, absence of occlusion, or gameplay success. Desktop screenshots cannot calibrate Electron input. Omitting `coordinateSpace` preserves legacy window coordinates and panel-center offsets; keyboard input is unchanged.
## Project-authored MCP prompts
Create Markdown files in `<Cocos project>/mcp-prompts/`. These are MCP workflow templates, not executable scripts or automatically applied instructions. A client explicitly requests a template through `prompts/get`.
Example: `mcp-prompts/inspect-prefab.md`
```markdown
---
name: inspect_prefab
description: Inspect a Cocos prefab without modifying it.
arguments: prefab_path(required), focus
---
Inspect prefab {prefab_path}. Focus: {focus}.
1. Read cocos://project/context and confirm the active Cocos project.
2. Resolve the exact asset URL and UUID. Inspect the prefab and its references using the exposed tool catalog.
3. Report missing references, unexpected layers, or hierarchy problems with exact asset/node identifiers.
This workflow is read-only. Do not rebuild or modify the prefab.
```
```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "prompts/get",
"params": {
"name": "inspect_prefab",
"arguments": {
"prefab_path": "db://assets/ui/Main.prefab",
"focus": "UI_2D layers and serialized references"
}
}
}
```
- The frontmatter is a small dependency-free format, **not general YAML**: unquoted single-line `name`, `description`, and comma-separated `arguments` only. A `(required)` suffix marks mandatory arguments.
- Names match `[a-z][a-z0-9_-]{0,63}`. Descriptions are at most 512 characters. The body must not be empty.
- Argument values must be strings. Missing required values, unknown names/arguments, and non-string values return JSON-RPC `-32602`. Omitted optional placeholders become empty strings. Substitution is single-pass and never evaluates code.
- Built-in names cannot be shadowed. Duplicate names, oversized files, malformed definitions, and symlinks are skipped with warnings in the Cocos editor console and MCP diagnostic logs.
- Discovery is limited to the first 100 top-level `.md` files in name order, each at most 256 KiB. Prompt arguments are limited to 65,536 characters each.
- Files are re-read on `prompts/list` and `prompts/get`; no editor restart is required. Clients that cache the prompt list may need a refresh/reconnect. The server does not advertise prompt-list change notifications.
- Existing built-in prompts remain callable without arguments. Optional context arguments are `touched_paths`, `idea`, `focus`, and `target` / `component_type`, respectively.
## Connection examples
Use the exact server name and URL in the MCP Server panel. Documentation examples containing `funplay_cocos` and port `8765` illustrate a legacy/fixed endpoint, not the new default. The stdio wrapper's legacy default is also `8765`; pass `--url` or `FUNPLAY_COCOS_MCP_URL` explicitly for a project-derived port.
Generated JSON preserves unrelated settings and entries. VS Code, OpenCode, and CodeBuddy accept comment-preserving JSONC edits; strict-JSON clients still reject comments and trailing commas. Duplicate keys and malformed/non-object configurations are left untouched with an error. Disabled or command-based entries require manual review instead of being reported as configured HTTP connections. TOML updates preserve unrelated sections and options, accept an empty `[mcp_servers]` parent with explicit server tables, and leave ambiguous forms such as inline MCP tables or multiline strings to manual configuration. Codex respects `CODEX_HOME`. VS Code uses the canonical platform-specific user-profile path even before that directory exists, including its portable/appdata overrides. OpenCode retains existing `mcp.servers` nesting or compatible V1 flat entries without migrating custom options. Configuration writes preserve file permissions and reject a changed read snapshot before atomic replacement.
To pin a port explicitly in `funplay-cocos-mcp.config.json`:
```json
{
"host": "127.0.0.1",
"portMode": "fixed",
"port": 8765
}
```
Use `"portMode": "project"` to derive the port again. `COCOS_MCP_PORT` overrides the saved choice for that editor process.
+240
View File
@@ -0,0 +1,240 @@
# Tool Reference
<!-- This file is generated by `npm run docs:generate`. Do not edit by hand. -->
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. |