Skip to main content
Glama
SaloQT

imgui-mcp

by SaloQT

imgui_drain_events

Process pending native UI events in bounded batches, returning events, remaining queue depth, and dropped event count to manage input flow effectively.

Instructions

Drain a bounded batch of native UI events. Returns the events, remaining queue depth, and the number dropped since the previous drain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_eventsNoMaximum events to return (default 100, maximum 256)
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It's clear this is a read-like operation that drains (consumes) events rather than just peeking, which is useful. It discloses the return fields (events, queue depth, dropped count) well, though it doesn't state side effects of draining (events are consumed and cannot be re-read) explicitly.

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 sentences, zero waste. The first sentence declares the action and returns; the second enumerates the three output fields. Every word earns its place.

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 simple one-parameter drain tool with no output schema and no annotations, the description adequately covers purpose, behavior, and return values. The 'dropped since previous drain' detail is particularly informative, indicating rate-limit/capacity behavior. Given the tool's simplicity, the description is reasonably complete despite minimal guidelines.

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 coverage is 100% for the single max_events parameter, which has a clear description with defaults and bounds. The description doesn't add parameter-specific guidance beyond what the schema provides, so baseline 3 is appropriate; the 'bounded batch' phrase loosely correlates with max_events but adds no syntax or behavior details.

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 uses a specific verb (drain) plus a resource (bounded batch of native UI events), clearly stating it returns events, remaining queue depth, and dropped count. This distinguishes it from siblings like imgui_get_canvas_events and imgui_get_input_state, 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?

The 'bounded batch' phrasing implies this is partial draining rather than a full flush, giving some usage context. However, there's no explicit guidance on when to use this versus imgui_get_canvas_events or imgui_get_input_state, nor when repeated draining is necessary to empty the queue.

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