Skip to main content
Glama
Wilson520403

fgui-agent-bridge

by Wilson520403

fgui_replace_object_resource

Replace Image or Loader resource references in FairyGUI Editor. Optionally save and verify changes by comparing disk XML or reloading the document to ensure persistence.

Instructions

通过 Editor API 替换 Image/Loader 图片引用;保存后默认比对磁盘 XML。Button 状态暂不支持。

external_reload=True 会在保存后关闭并重新打开文档再比对,是唯一能证明「重新载入时值不丢」的验证;需要 save=True。响应中的 strength 字段标明验证强度:reload / disk / none。

Input Schema

NameRequiredDescriptionDefault
saveNo
stateNo
verifyNo
object_idNo
object_nameNo
object_pathNo
resource_urlYes
expected_typeNoimage
external_reloadNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.6

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses the default post-save verification against disk XML, the side effect of closing and reopening the document under external_reload, the save=True dependency, and the meaning of the response strength field (reload/disk/none). It omits auth/permission needs and what happens to the prior reference, so not quite a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in the first clause, and the two-sentence structure is dense but largely waste-free. The semicolon-heavy construction is a little compressed but every statement conveys operational detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be explained, and the description covers verification behavior thoroughly. However, for a mutation tool with no annotations and 0% parameter documentation, the seven undocumented parameters leave the definition incomplete for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, so the description must compensate. It explains save and external_reload behavior, but leaves resource_url, object_id, object_name, object_path, state, verify, and expected_type entirely undocumented, which is a substantial gap for a 9-param tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource: replacing Image/Loader image references via the Editor API, and adds a scope limitation (Button states not supported). An agent can tell what the tool does. It does not, however, explicitly differentiate itself from siblings like fgui_set_property or fgui_import_image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a clear exclusion ('Button states not supported') and a conditional requirement (external_reload needs save=True), which edges toward when-to-use guidance. However, it never names alternatives or states the general situation in which this tool should be chosen over related tools, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.