Skip to main content
Glama
fgui-agent-bridge

fgui-agent-bridge

by Wilson520403

fgui_query_references

Find every package, resource, and property slot that references a target FairyGUI resource before changing it. Returns exact read-only dependency results with optional result limits and package-open control.

Instructions

查询全工程里哪些位置引用了目标资源(只读,0.8.10+)。

走编辑器原生 DependencyQuery,返回的每条引用精确到「哪个包的哪个资源的哪个属性槽」: packageId / itemId / propKey / arrayIndex / valueType。改资源引用前先跑它,能直接回答 「换掉这张图会影响哪些节点」,也可作为 replace_object_resource 的影响面预览。

只读:不会保存、不会标记文档修改。max_items 限制返回条数(默认 200,上限 2000), 截断时 truncated=true 且 totalCount 仍为真实总数,不会静默丢弃。 skip_package_open=True 跳过「预先打开未打开的包」,更快但可能少算未打开包里的引用; 默认会先打开,代价记录在响应的 packages 字段里。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "resource_url": "<resource_url>"
    },
    "name": "fgui_query_references"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_itemsNo
resource_urlYes
skip_package_openNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.25

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden of disclosure, and it meets that burden: it states the call is read-only, saves nothing, and marks nothing dirty; it documents the truncation contract (max_items default 200, hard cap 2000, truncated=true, totalCount still the true total, no silent loss); and it discloses the side effect and cost of skipping the package open step, including the packages response field. These are exactly the facts an agent cannot get from the schema.

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 content is front-loaded: the core purpose comes first, then the return shape, then usage guidance, then the caveats. Every clause carries information (defaults, caps, truncation flags, tradeoffs), though the paragraph form is slightly denser than it needs to be. It could be tightened without losing facts.

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

Completeness4/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 need no explanation, yet the description still helpfully summarizes the reference record fields. For a read-only query with three parameters, it is nearly complete. The one real hole is how to construct resource_url, the only required input.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it does for two of the three parameters: max_items gets a default, a cap, and truncation semantics, and skip_package_open gets a default plus its accuracy/performance tradeoff. The single required parameter, resource_url, gets no format guidance at all, so the agent must guess whether it wants a ui:// URL, a package/item pair, or a raw path.

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 and resource: query project-wide references to a target resource, read-only, via the editor's native DependencyQuery, with results broken down to packageId/itemId/propKey/arrayIndex/valueType. That is far more specific than the bare name. However, it never distinguishes itself from the sibling tool fgui_query_dependencies, which an agent could reasonably confuse it with.

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

Usage Guidelines4/5

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

It gives a clear trigger ('run it before changing resource references'), a concrete question it answers ('which nodes are affected if I swap this image'), and names a downstream tool whose impact it previews (replace_object_resource). It gives no explicit exclusion, so the agent must infer when to choose this tool over fgui_query_dependencies or fgui_find_unused.

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

Deploy Server

Other Tools