Skip to main content
Glama
Wilson520403

fgui-agent-bridge

by Wilson520403

fgui_set_relation

Replace an object's Relation bindings in FairyGUI Editor 0.8.8+, setting target sides and percent pairs to control layout resizing.

Instructions

整体替换对象的 Relation 绑定(0.8.8+)。relations 每项为:

{"target": {"id"/"path"/"name"} 或 null(null/缺省 = 父组件), "sidePair": "left-left,right-right" 或 "pairs": [{"source": "right", "target": "right", "percent": false}]}

sidePair 方向名:left/center/right/leftext/rightext/width(水平), top/middle/bottom/topext/bottomext/height(垂直);percent 追加 % 后缀。

external_reload=True 需 save=True,关闭重开文档后重新比对;strength 标明验证强度。

Input Schema

NameRequiredDescriptionDefault
saveNo
verifyNo
object_idNo
relationsYes
object_nameNo
object_pathNo
external_reloadNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.6

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It does disclose meaningful traits: whole-replace (destructive to existing bindings), the version requirement, and the external_reload/save coupling plus verify semantics. It omits permissions, failure behavior, and whether the change is undoable.

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?

Dense and front-loaded: the replacement scope and version come first, then the payload format, then the reload constraint. No filler sentences, though the nested brace/parenthetical formatting is hard to scan.

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 need not be explained. However, for a 7-parameter mutation tool with 0% schema coverage, missing guidance on how the target object is identified and what save/verify do leaves a real gap.

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% across 7 parameters, so the description must compensate. It richly documents the relations item shape and sidePair direction vocabulary, but says nothing about object_id/object_name/object_path, save, or verify, leaving several parameters undocumented in both places.

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?

States a specific verb+resource: 整体替换对象的 Relation 绑定 (whole replacement of an object's relation bindings), plus a version gate (0.8.8+). That scope word 整体 clearly signals it is not incremental, and no sibling tool covers relations, so no sibling differentiation is needed.

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?

Gives one conditional dependency (external_reload=True requires save=True, and requires reopening the document to re-compare), but never states when to use this tool versus siblings like fgui_set_property, nor any prerequisite for identifying the target object.

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