Skip to main content
Glama
fgui-agent-bridge

fgui-agent-bridge

by Wilson520403

fgui_rename_package_item

Rename a FairyGUI package item and its disk file; this is irreversible. Duplicate names are rejected and stale fileName references are reported.

Instructions

重命名包资源;磁盘文件同步改名,不可撤销。

new_name 不带扩展名(编辑器按资源类型补)。同名资源会被拒绝。 改名不会更新引用方文档的 fileName 属性(id 不变,运行时按 id 解析不受影响), 响应里的 staleFileNameSlots 会列出这些位置,需要时让那些文档经编辑器重新保存一次即可补齐。

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": {
      "new_name": "<new_name>"
    },
    "name": "fgui_rename_package_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
saveNo
verifyNo
new_nameYes
item_nameNo
item_pathNo
package_nameNo
close_open_documentsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.25

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does most of it well: it declares the operation irreversible, states that the disk file is renamed synchronously, and discloses the non-obvious side effect that referring documents' fileName properties go stale while id-based runtime resolution is unaffected. The gap is that the open-document situation is never explained, despite a close_open_documents parameter existing, and save/verify behaviour is left entirely unstated.

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

Conciseness5/5

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

The irreversible warning is front-loaded in the first clause, followed by the naming rule, then the reference-staleness caveat with its remedy. Every sentence adds information an agent would otherwise have to discover by trial, and nothing is repeated from the schema or title.

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?

For a destructive, eight-parameter mutation tool with no annotations, the description covers the risk profile and the downstream consequences well, and the output schema means return values need not be detailed. However, leaving seven parameters including close_open_documents unexplained means an agent still cannot reason about what happens when documents are open at rename time, which is a material omission for this operation.

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 8 parameters, so the description must compensate and it only does so for new_name, explaining the no-extension convention and the duplicate-name rejection. The other seven (url, save, verify, item_name, item_path, package_name, close_open_documents) get no meaning at all, and the most consequential one, close_open_documents, is especially conspicuous in its absence.

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

Purpose5/5

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

The description opens with a specific verb and resource ("重命名包资源") and immediately qualifies scope by noting the on-disk file is renamed in sync. That distinguishes it cleanly from the neighbouring fgui_move_package_item, fgui_duplicate_package_item and fgui_delete_package_item without the agent needing to open any schema.

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 concrete conditions for correct use: new_name must omit the extension because the editor appends it by resource type, and a colliding name will be rejected. It also prescribes a follow-up procedure (re-save affected documents to fill staleFileNameSlots). What it never does is point at a sibling for the adjacent cases, such as moving or duplicating an item, so it stops short of explicit alternatives.

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