Skip to main content
Glama
SaloQT

imgui-mcp

by SaloQT

imgui_add_widget

Add any of 80+ ImGui widget types—buttons, sliders, inputs, color pickers, trees, tables, menus, and more—to a target window in real-time, enabling AI agents to visually build and iterate on game UIs.

Instructions

Add a widget to an ImGui window. Supports 80+ widget types including buttons, text, inputs, sliders, drags, color pickers, combos, trees, tables, menus, popups, plots, containers, and tooltips.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique widget identifier
dirNoDirection for arrow_button (0=left, 1=right, 2=up, 3=down)
maxNoMaximum value for float sliders/drag
minNoMinimum value for float sliders/drag
hintNoHint/placeholder text for input_text_with_hint
openNoOpen state for tree_node/collapsing_header/popup
rowsNoRow data for table widget (array of arrays of strings)
sizeNoSize [w, h] for dummy, button, child_window, invisible_button
stepNoStep increment for input widgets
textNoInitial text for input widgets
colorNoRGBA color [r,g,b,a] each 0.0-1.0
flagsNoImGui flags for the widget (e.g. checkbox_flags, tree_node_ex)
itemsNoItems for combo/listbox/menu
labelNoWidget label/display text
speedNoSpeed/sensitivity for drag widgets
valueNoFloat value (sliders, progress, drag, single-component)
formatNoFormat string for sliders/drag (e.g. '%.2f', '%d')
valuesNoArray of floats for multi-component widgets (float2/3/4, drag_range2) or plot data
windowYesTarget window id
checkedNoCheckbox/radio button state
columnsNoNumber of columns for table widget
contentNoText content (for text widgets)
enabledNoWhether widget is enabled/interactable
headersNoColumn headers for table widget
int_maxNoMaximum for int sliders/drag
int_minNoMinimum for int sliders/drag
overlayNoOverlay text for progress_bar
tooltipNoTooltip text shown on hover
childrenNoNested child widgets (for tree_node, collapsing_header, menu, tab_item, group, child_window)
selectedNoSelected index for combo/listbox/selectable
shortcutNoKeyboard shortcut string for menu_item (e.g. 'Ctrl+S')
int_valueNoInteger value (int sliders, drag, single-component)
step_fastNoFast step increment for input widgets (ctrl+click)
int_valuesNoArray of ints for multi-component int widgets (int2/3/4)
widget_typeYesType of widget to create
Behavior2/5

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

No annotations are provided, so the description carries full burden of behavioral disclosure. It doesn't mention side effects, whether it's a mutating operation (which it clearly is), what happens on failure (invalid window, invalid widget type), whether widgets are immediately rendered or require a subsequent imgui_draw call, or whether the operation is reversible (undoable). For a mutation tool creating UI elements with 100+ types, this is a significant transparency gap.

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?

The description is a single efficient sentence that clearly states the tool's purpose and scope. It conveys the breadth of coverage (80+ types) without unnecessary elaboration. No wasted words.

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

Completeness2/5

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

This is a highly complex tool (35 parameters, 101 enum values for widget_type, no output schema) and the description provides minimal guidance. It doesn't explain which parameters are relevant for which widget types, how the param-to-widget-type mapping works, whether certain params are mutually exclusive, or what happens with nested children. The schema alone is insufficient to correctly select parameters for a given widget_type without deeper mapping knowledge.

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 baseline is 3. The description mentions '80+ widget types' but doesn't map which parameters apply to which widget types. The schema has 32 optional parameters whose relevance is entirely dependent on widget_type, and the description doesn't help disambiguate which params each widget needs.

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?

The description states a clear verb+resource ('Add a widget to an ImGui window') and enumerates supported widget types, which distinguishes it from sibling tools like imgui_update_widget or imgui_remove_widget. However, it doesn't explicitly contrast with imgui_update_widget, though the verb 'Add' clearly implies creation versus modification.

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

Usage Guidelines2/5

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

There's no guidance on when to use this vs. alternatives. It doesn't mention prerequisites like needing to create a window first (imgui_create_window), or that imgui_update_widget should be used for modifying existing widgets, or imgui_set_widget_visibility for showing/hiding. The context of window creation requirement is implied but not stated.

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/SaloQT/imgui-mcp'

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