Skip to main content
Glama
fgui-agent-bridge

fgui-agent-bridge

by Wilson520403

fgui_import_image

Imports an image from an absolute local path into a FairyGUI package, with conflict handling, optional downscaling to a max long-edge size, and post-save verification.

Instructions

从绝对本地路径导入图片;这是磁盘写入操作,支持拒绝、自动改名或替换同名图片。

max_size 是长边上限(像素,1~32768):源图长边超过它就先等比缩放再入库,响应里的 scaled 回报缩放前后尺寸与缩放比,atlasPrecheck 给出按真实图集约束的前置判定(fit 为 fits/exceeds/unknown,unknown 不等于放行)。

save=True 保存包与工程后默认比对 package.xml(分支写入比对 package_branch.xml)条目和资源文件;external_reload=True(需 save=True)卸载并重新加载 asset 再比对,响应 strength 为 reload / disk / none。

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": {
      "package_name": "<package_name>",
      "source_path": "<source_path>"
    },
    "name": "fgui_import_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNo
branchNo
verifyNo
exportedNo
max_sizeNo
folder_pathNo
source_pathYes
package_nameYes
resource_nameNo
create_foldersNo
conflict_policyNoerror
external_reloadNo
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.25
    • addedInput schema / properties / branch
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Branch"
      +}
    • addedInput schema / properties / max_size
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Size"
      +}
  2. Changed3 schema fields changedv0.8.6
    • addedInput schema / properties / external_reload
      Added value: +{
      +  "default": false,
      +  "title": "External Reload",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / save
      Added value: +{
      +  "default": false,
      +  "title": "Save",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / verify
      Added value: +{
      +  "default": true,
      +  "title": "Verify",
      +  "type": "boolean"
      +}
  3. First observedv0.6.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full load and does substantial work: it declares the disk-write nature, the three conflict outcomes (error / auto rename / replace), the pre-import downscale behavior with the 1-32768 bound, and the verification strength ladder (reload / disk / none). It explicitly warns that atlasPrecheck 'unknown' is not a pass, which is a meaningful behavioral caveat. It omits permissions, timeout behavior, and what happens to the package when save fails, keeping it below 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 structure is front-loaded: purpose and write-safety first, then parameter-specific behavior in separate paragraphs. Sentences are dense but each carries real information about behavior. The prose is long, but given 13 undocumented parameters that length is largely earned rather than padded.

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?

This is a high-complexity, 13-parameter mutation tool with no annotations, so the description should scaffold more of the parameter space. It covers the risky or non-obvious parts well and an output schema exists so return values needn't be restated, yet half the inputs (resource naming, folder creation, verify/exported flags, timeout) remain unexplained relative to the tool's complexity.

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 13 parameters, so the description must compensate and it only partly does. It meaningfully explains max_size, save, branch (indirectly via package_branch.xml), external_reload, and conflict_policy, but source_path, package_name, resource_name, folder_path, create_folders, verify, exported, and timeout_seconds are left entirely to the bare schema titles. That leaves the majority of parameters undefined for the caller.

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 opens with a specific verb and resource: importing an image from an absolute local path, which separates it from the font and sound import siblings by resource type. It also names the core mechanism (a disk write) up front. It doesn't explicitly contrast itself with alternatives such as fgui_insert_loader or fgui_replace_object_resource, so it stops short of a 5.

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?

Usage guidance is present but parameter-conditional rather than tool-selection oriented: it explains that external_reload requires save=True and what conflict_policy's three behaviors mean in practice. It never says when an agent should prefer this tool over other resource-creation or placement tools. The conditions are implied by the option semantics rather than stated as routing rules.

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