Skip to main content
Glama
fgui-agent-bridge

fgui-agent-bridge

by Wilson520403

fgui_insert_text

Creates a text object under the current FairyGUI document root component, with style options and optional save/verification. Use it for bare text nodes instead of package resources.

Instructions

在当前文档根组件下创建文本对象(0.8.20+);结构操作不能由 Agent 属性事务栈撤销。

文本是 FGUI 的裸节点、不是包资源,所以只能用 insert_text 造,不能用 insert_object。 style 支持:font / fontSize / color / align / vAlign / autoSize / letterSpacing / lineGap / width / height / bold / italic / underline / strokeSize / strokeColor / shadowX / shadowY / shadowColor。 其中 width/height 会自动把 autoSize 切成 none(否则编辑器在保存时按文字自然尺寸重算,写进去的尺寸会被改写)。 投影偏移(shadowX/shadowY)会自动打开投影开关:偏移不伴随开关时编辑器不会落盘。

save=True 保存后默认比对磁盘 XML;external_reload=True 会在保存后关闭并重新打开文档再比对,需要 save=True。响应中的 strength 字段标明验证强度:reload / disk / none。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fgui_insert_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
nameNo
saveNo
textNo
styleNo
verifyNo
external_reloadNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.25

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full load and does so: it discloses that structural operations cannot be undone by the Agent property transaction stack, explains editor quirk behavior (autoSize switching to none when width/height set, shadow switch auto-enabled with offsets), and describes verification strength levels (reload/disk/none). This is substantial behavior beyond 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?

Purpose is front-loaded, followed by constraints and verification semantics. The long enumeration of style keys is dense but earns its place since the schema has no property descriptions; otherwise there is little waste.

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

Completeness5/5

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

The tool is complex (8 params, nested style object, save/verify behavior) and the description covers the critical behavioral caveats an agent needs, including undo limitation and verification modes. An output schema exists, and the description still usefully explains the strength field, so return values need not be elaborated further.

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

Parameters4/5

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

With 0% schema description coverage and 8 parameters, the description must compensate; it documents the style object's supported keys in detail and explains the interaction between width/height, shadowX/shadowY, and autoSize. However, x, y, name, text, and verify are not given explicit meaning, leaving gaps that the schema alone cannot fill.

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 uses a specific verb+resource (create a text object under the current document's root component) and explicitly contrasts with the sibling fgui_insert_object, stating that text is a bare FGUI node, not a package resource, so insert_text must be used. An agent can distinguish this from the sibling without opening either schema.

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

Usage Guidelines5/5

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

It explicitly names the alternative (insert_object) and states the condition that selects this tool instead. It also specifies that save=True must be set before external_reload=True is meaningful, giving concrete usage sequencing rather than leaving it to inference.

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