Skip to main content
Glama
aea91
by aea91

Get an ArkUIBuilder widget

get_widget
Read-only

Retrieves details of a specific ArkUI widget by name, id, or title, optionally including its source code for adaptation.

Instructions

Details of one widget by component name (e.g. ColorStudioFb), id or title. Set include_code only if you need to read or adapt its source; to use it as-is call add_widget instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name, id or title
include_codeNoInclude the full ArkTS source (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely useful behavioral context: include_code pulls the full ArkTS source (a materially heavier payload) and should only be set for read/adapt scenarios.

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?

Two tight sentences, front-loaded with the identifier forms and ending with the conditional/alternative routing. Every clause carries actionable information with no filler.

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

Completeness4/5

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

For a two-parameter read tool with a read-only annotation and no output schema, the definition covers identity, the payload-cost branch, and the sibling alternative. Only the shape of the returned widget details is left implicit.

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 100%, so the identifier formats for name are already documented and the description largely repeats them. include_code's cost/usage intent is a mild addition beyond the schema's (default false) note, keeping this at the baseline.

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 (retrieve details) and resource (one widget) with the three accepted identifier forms. It is clearly distinguishable from siblings, and explicitly names add_widget as the alternative path for using a widget as-is.

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?

Gives an explicit conditional for include_code (only when you need to read or adapt the source) and routes the as-is use case to add_widget. It does not mention search_widgets as the discovery alternative, so the guidance is strong but not exhaustive.

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