Skip to main content
Glama

set_widget_style

Modify widget fill, border, text colors, and corner radius by target or name, then sync changes back to Axure RP source.

Instructions

快捷修改元件视觉样式(fill 背景色、stroke 边框色、color 文字颜色、radius 圆角):定位(target 或 widget+page)→ 更新二进制 MyStyle(DOAName 3221225479 / 3221225480 / 3221225478 / 3221225543)及富文本 Run 颜色 → 写新链节点并校验三零。颜色支持 #RRGGBB 或 #RRGGBBAA;改动可被 sync_prototype(lift/merge) 自动导回 RP/1 源码。

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": "set_widget_style"
  }
}

Input Schema

NameRequiredDescriptionDefault
fillNo
pageNo
colorNo
editsNo
radiusNo
strokeNo
targetNolocate 返回的定位字段对象(record+id [+container] 精确定位)或 {query[,page][,type]} 搜索(须唯一)或字符串(按名称/文本搜)
widgetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.5

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, closed-world mutation, and the description adds real depth beyond them: it names the underlying binary MyStyle records (DOAName IDs), the rich-text Run color path, and the 'write new chain node + validate 三零' write procedure. The gap is that it says nothing about the batch edits array or failure behavior when a target is ambiguous.

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?

One dense, front-loaded sentence that leads with the purpose and then the mechanics; no filler sentences. The inline DOAName numeric constants are arguably noise for an agent choosing how to call it, which keeps it from a 5.

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 an 8-parameter mutation tool with no output schema and very low schema coverage, the description leaves the edits[] bulk-edit path entirely undocumented and says nothing about edit return values or rollback. It is adequate for the single-widget path but not for the full surface of the tool.

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 only 13% schema coverage the description must carry the load, and it covers most of it: fill/stroke/color/radius meanings, the target-vs-widget+page locating split, and the accepted #RRGGBB / #RRGGBBAA formats. The notable omission is the edits[] batch array, and the stated formats are narrower than the schema's minLength 4.

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?

States a specific verb (修改) and resource (元件视觉样式) and enumerates exactly which properties it touches (fill, stroke, color, radius), which cleanly separates it from siblings such as set_widget_geometry, set_widget_richtext and set_widget_text.

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 a concrete locating recipe (target, or widget+page) and notes that edits can be synced back with sync_prototype(lift/merge), which is useful context. It never says when to prefer this over set_widget_geometry or set_widget_richtext, nor when not to use it (e.g. text content changes), so guidance is implied rather than explicit.

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