Skip to main content
Glama
SaloQT

imgui-mcp

by SaloQT

imgui_update_draw_command

Update a single draw command within a named ImGui draw layer by its index, modifying only the specified fields like color, position, or thickness without rebuilding the entire layer's command list.

Instructions

Update a single draw command in a named draw layer without replacing the entire layer. Specify the command index and the fields to change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesIndex of the draw command to update
layerNoDraw layer widget id (default: draw_list)draw_list
fieldsYesFields to update on the draw command
windowYesTarget window id
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not state whether fields not specified in 'fields' remain unchanged (though 'without replacing the entire layer' implies this), whether out-of-range indices fail or are ignored, whether values are validated for bounds (e.g., color length), or whether a re-draw/refresh is automatically triggered. For a mutation tool touching ImGui state, this is a meaningful 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 is front-loaded with the primary action and purpose. There is no waste. It could add a touch more behavioral guidance without becoming bloated, but as-is it is appropriately sized.

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?

Given the tool complexity (nested fields object with 9 updatable properties) and no output schema, the description is somewhat thin. It successfully conveys the core intent and the partial-update semantics, but does not explain what the field keys mean, how the command index maps to draw commands, or what the expected behavior is on invalid indices. For a fairly complex state-mutation tool, this is a moderate completion level.

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%, with all parameters documented (window, index, layer, fields). The description adds the contrast of partial vs full layer replacement, which helps clarify the 'fields' subset semantics. However, it doesn't explain the meaning of the field keys like p1/p2/p3/p4 (which presumably map to ImGui draw command point arrays) or the valid ranges for values such as color components. The schema provides structure, so baseline 3 is appropriate, but the p1-p4 semantics remain unexplained.

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 clearly states the verb (update), the resource (a single draw command within a named draw layer), and the scoping (without replacing the entire layer, by index). It distinguishes itself from a bulk-replace operation. However, it doesn't explicitly contrast with sibling tools like imgui_update_widget or imgui_transform_draw_layer, so sibling differentiation is implied rather than explicit.

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 clearly implies this is for targeted single-command edits (supported by 'without replacing the entire layer'), and the parameter details hint at the when. But there are no explicit exclusions or named alternatives (e.g., using imgui_transform_draw_layer for bulk transforms, or imgui_draw for redrawing). Usage context is adequate but not enriched beyond the obvious.

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