Skip to main content
Glama

set_widget_value

Set widget values by widget ID and value string. Converts the value to the appropriate type for the widget (Entry, Scale, Combobox, Checkbutton, Radiobutton, Listbox, Spinbox).

Instructions

Set the value of a widget based on its type.

Sets the appropriate value for the widget type:

  • Entry/Text: sets text content

  • Scale: sets numeric value (e.g., "50.0")

  • Combobox: sets selected text

  • Checkbutton: sets checked state ("true"/"false")

  • Radiobutton: selects this radio button (value ignored)

  • Listbox: selects item by index (e.g., "0", "1")

  • Spinbox: sets value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widget_idYesThe widget ID from get_ui_layout()
valueYesThe value to set (converted appropriately for widget type)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Without annotations, the description carries full burden. It details per-type value setting, but lacks disclosure of side effects (e.g., triggering events), error handling, or validation constraints.

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?

The description is concise, front-loaded with the action, and uses a clear bullet list to enumerate widget types without unnecessary fluff.

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?

The description covers essential behavior per widget type, but lacks mention of validation (e.g., invalid widget type), error scenarios, or return value details, which an output schema might partially address.

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?

Schema coverage is 100%, and description adds significant meaning beyond schema by explaining how 'value' is interpreted for each widget type.

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 clearly states the verb 'Set' and resource 'widget value', and distinguishes itself from siblings like get_widget_value and click_widget by detailing widget-type-specific value setting behaviors.

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?

The description implies when to use (after obtaining widget_id from get_ui_layout), but does not explicitly state when not to use or recommend alternatives for other interactions like clicking or typing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tctibbs/tkinter-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server