FairyGUI Agent Bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FGUI_PROJECT_PATH | Yes | The absolute path to the FairyGUI project directory that the MCP server should operate on. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| fgui_statusA | 读取本地 FairyGUI 工程选择和桥接心跳,不主动唤醒编辑器。 |
| fgui_pingA | 唤醒 FairyGUI Editor 并验证桥接协议、版本和能力。 |
| fgui_use_projectA | 为当前 MCP 会话选择 .fairy 文件、FairyGUI 工程目录或仓库目录。 |
| fgui_get_projectC | 读取当前 FairyGUI 工程信息。 |
| fgui_list_packagesA | 列出当前 FairyGUI 工程中的全部包。 |
| fgui_list_itemsA | 列出指定包中的资源,可按 FairyGUI 资源类型过滤。 |
| fgui_open_documentB | 按包名和资源名打开 FairyGUI 组件文档。 |
| fgui_create_componentA | 在指定包中新建组件文档;默认打开但不保存,重名时默认拒绝。 |
| fgui_import_imageA | 从绝对本地路径导入图片;这是磁盘写入操作,支持拒绝、自动改名或替换同名图片。 |
| fgui_import_fontB | 从绝对本地路径导入字体;这是磁盘写入操作,支持拒绝、自动改名或替换同名字体。 |
| fgui_create_buttonB | 创建标准 FairyGUI Button 组件;状态图顺序为 up/down/over/selectedOver/disabled/selectedDisabled。 |
| fgui_get_active_documentA | 读取当前活动文档、修改状态和选择数量。 |
| fgui_get_treeA | 读取当前组件对象树;修改前应先取得稳定的对象 ID 或路径。 |
| fgui_import_soundA | 从绝对本地路径导入声音资源;支持替换同名声音,属于磁盘写入。 |
| fgui_create_movieclipC | 用有序绝对图片路径创建或替换 MovieClip;图片序列由 FairyGUI 原生动画资源处理。 |
| fgui_get_movieclipC | 读取 MovieClip 的帧、FPS、Swing 和 RepeatDelay 设置。 |
| fgui_update_movieclipC | 更新已有 MovieClip;传入 frame_paths 时使用新的有序图片序列替换动画帧。 |
| fgui_remove_movieclipC | 删除 MovieClip 包资源;这是不可逆资源操作,必须显式 force=True。 |
| fgui_list_transitionsA | 读取当前组件的全部 Transition 及类型化关键帧。 |
| fgui_get_transitionA | 按名称读取当前组件的一个 Transition。 |
| fgui_upsert_transitionB | 声明式创建或完整替换一个 Transition;一次调用可由 fgui_undo/redo 原子回退。 |
| fgui_remove_transitionA | 删除当前组件中的一个 Transition;可由 fgui_undo 恢复。 |
| fgui_add_transition_itemC | 向 Transition 添加一个类型化关键帧轨道项。 |
| fgui_update_transition_itemB | 替换 Transition 指定索引的关键帧项;可用 fgui_undo/redo 回退。 |
| fgui_remove_transition_itemB | 删除 Transition 指定索引的关键帧项;可用 fgui_undo 恢复。 |
| fgui_preview_animationA | 在 Editor 中播放、暂停、停止、跳帧或查询预览状态;预览不会保存到 FairyGUI 资源。 |
| fgui_get_historyB | 读取 Agent 属性事务栈和 FairyGUI 原生撤销状态。 |
| fgui_select_objectB | 通过对象 ID、对象树路径或唯一名称选择一个对象。 |
| fgui_set_propertyA | 修改白名单属性但不保存;该操作进入 Agent 属性 undo/redo 事务栈。 |
| fgui_replace_object_resourceB | 通过 Editor API 替换 Image/Loader 图片引用;保存后默认比对磁盘 XML。Button 状态暂不支持。 |
| fgui_get_text_styleC | 读取 TextField/RichText 的统一文本样式。 |
| fgui_set_text_styleC | 设置 TextField/RichText 的统一文本样式。 |
| fgui_verify_documentB | 只读验证 target 的 expected 属性;默认比对磁盘 XML,不保存、不重载。无 expected 时仅返回快照。 |
| fgui_insert_objectA | 插入已有 ui:// 资源但不保存;结构操作不能由 Agent 属性事务栈撤销。 |
| fgui_remove_objectA | 删除非根对象但不保存;需要可靠回退时使用 fgui_discard_document。 |
| fgui_undoA | 优先撤销 Agent 属性事务;事务栈为空时回退到 FairyGUI 原生撤销。 |
| fgui_redoA | 优先重做 Agent 属性事务;事务栈为空时回退到 FairyGUI 原生重做。 |
| fgui_save_documentA | 显式保存当前 FairyGUI 文档,并清空 Agent 属性事务栈。 |
| fgui_save_allA | 显式保存所有 FairyGUI 文档、已打开包和工程,并清空 Agent 属性事务栈。 |
| fgui_get_publish_settingsA | 读取工程发布目录、格式、图集、代码生成和包级覆盖设置。发布前应先调用。 |
| fgui_publishA | 按工程发布设置导出 FairyGUI 包。默认发布当前文档所属包并先保存;可选择指定包或全部包。 |
| fgui_discard_documentA | 放弃当前文档全部未保存修改并重新加载磁盘版本。 |
| fgui_search_componentB | 在所有包中搜索组件 Args: name_pattern: 组件名称模式(支持部分匹配) Returns: 匹配的组件列表 |
| fgui_get_package_infoB | 获取指定 UI 包的详细信息 Args: package_name: 包名称 Returns: 包的详细信息,包括所有资源列表 |
| fgui_list_resourcesB | 列出包内的资源 Args: package_name: 包名称 resource_type: 资源类型过滤 (component/image/font/folder),不指定则列出全部 Returns: 资源列表 |
| fgui_parse_componentC | 解析组件并生成自然语言描述 将组件 XML 解析为易于理解的结构化描述,包含:
Args: package_name: 包名称 component_name: 组件名称 Returns: 组件的结构化描述 |
| fgui_validate_componentC | 验证组件规范 检查组件是否符合 FairyGUI 规范和项目最佳实践:
Args: package_name: 包名称 component_name: 组件名称 Returns: 验证结果 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 47 tools
fgui_list_items and fgui_list_resources are nearly identical, and fgui_get_package_info also returns resource lists, creating clear ambiguity. Additionally, fgui_create_button overlaps with fgui_create_component. While most tools have distinct targets, these duplicates make misselection likely.
The overwhelming majority of tools follow the fgui_verb_noun snake_case pattern (e.g., fgui_create_component, fgui_get_tree, fgui_remove_transition). Minor exceptions like fgui_status, fgui_ping, and fgui_undo/redo are acceptable but keep it from being perfectly uniform.
With 47 tools, the server far exceeds the 25+ threshold for a heavy toolset. While the FairyGUI editor is complex, many functions are overly granular (e.g., 7 transition-related tools) and several could be merged, making the count feel excessive rather than well-scoped.
The toolkit covers a wide range of workflows including components, text styles, transitions, movieclips, imports, and publishing. However, obvious gaps exist such as no component deletion or renaming, no package creation, and no controller editing, which limits full lifecycle coverage.