Skip to main content
Glama
SaloQT

imgui-mcp

by SaloQT

imgui_get_widget_rect

Get a Dear ImGui widget's exact rendered bounding box in pixel coordinates to precisely position UI elements or handle interactions.

Instructions

Get the actual rendered bounding box of a widget in pixel coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWidget identifier
windowYesWindow containing the widget
Behavior3/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. It states it returns a bounding box in pixel coordinates, which is genuinely useful. However, it doesn't disclose whether the widget must be currently rendered/visible, whether it returns correct values before a draw pass, or whether it requires the widget to exist. The word 'actual rendered' hints at needing a render pass but isn't explicit.

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?

Single sentence, zero waste, front-loaded purpose. Without verbosity for a conceptually simple tool.

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 read-only geometry query with 2 well-documented parameters and no output schema, the description is reasonably complete. It explains what is returned (bounding box) and in what units (pixel coordinates). Minor gap: no statement about what happens for hidden/nonexistent widgets, but this is adequate for the tool's simplicity.

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% (both params have descriptions). The description adds the 'rendered' and 'pixel coordinates' context beyond the schema, which is helpful for interpreting the returned values, but doesn't add specifics about id/window format or behavior for missing widgets. Baseline 3 applies since schema handles the heavy lifting.

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 'Get the actual rendered bounding box of a widget in pixel coordinates' uses a clear verb (get) with specific resource (rendered bounding box of a widget) and clarifies the units (pixel coordinates). It's distinct from sibling imgui_get_window_rect (window-level) and imgui_get_layout, though it doesn't explicitly name those alternatives.

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?

No explicit when-to-use guidance or differentiation from alternatives. The description implies it's for retrieving widget geometry, but doesn't explain when to prefer this over imgui_get_layout, imgui_get_window_rect, or related geometry tools. Usage context is inferred 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