Skip to main content
Glama

Find a control, input or panel

find_ui

Find visible buttons, links, labels, and inputs by text or input name, returning references for clicking or interacting; optionally inspect a DOM subtree or list overlay panels.

Instructions

Find visible controls (buttons, links, labels, inputs) by text and/or input name; returns refs for click_ui/interact. Pass selector to inspect one DOM subtree, or discover:true to list overlay panels (mod GUIs).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoFilter: button, link, label, input, radio, checkbox, select, textarea.
nameNoFilter by input name attribute (exact).
textNoLabel text to search (case-insensitive, partial).
exactNoRequire an exact label match.
limitNoMax matches (default 20).
game_idNoSession id from open_game. Omit when a single game is open.
discoverNoList overlay panels with buttons or file inputs.
selectorNoInspect this DOM subtree instead of text search.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.3.0
    • addedInput schema / properties / discover
      Added value: +{
      +  "description": "List overlay panels with buttons or file inputs.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / exact / description
      Previous value: -"Require an exact label match (default false)."New value: +"Require an exact label match."
    • changedInput schema / properties / game_id / description
      Previous value: -"Session id returned by open_game."New value: +"Session id from open_game. Omit when a single game is open."
    • changedInput schema / properties / kind / description
      Previous value: -"Filter by kind: button, link, label, input, radio, checkbox, select, textarea."New value: +"Filter: button, link, label, input, radio, checkbox, select, textarea."
    • changedInput schema / properties / limit / description
      Previous value: -"Max matches to return (default 20)."New value: +"Max matches (default 20)."
    • addedInput schema / properties / selector
      Added value: +{
      +  "description": "Inspect this DOM subtree instead of text search.",
      +  "type": "string"
      +}
    • changedInput schema / properties / text / description
      Previous value: -"Label text to search for (case-insensitive, partial by default)."New value: +"Label text to search (case-insensitive, partial)."
    • removedInput schema / required
      Removed value: -[
      -  "game_id"
      -]
  2. First observedv0.1.3

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the behavioral load; it does disclose that only visible controls are matched and that refs feed click_ui/interact, which implies a non-mutating lookup. It does not state no-match behavior, truncation/limit semantics, or any session/permission prerequisites, leaving real gaps for an 8-parameter tool.

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?

One dense, front-loaded sentence with the primary purpose first and the two alternate modes after the semicolon; nearly every clause earns its place. The 'discover' clause is slightly compressed ('overlay panels (mod GUIs)'), but nothing is redundant.

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 an eight-parameter, zero-annotation tool with no output schema, the description covers purpose, the two operating modes, and the return contract (refs). Missing are result-count/truncation behavior and what happens when nothing matches, which are relevant given the limit parameter capped at 100.

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 the baseline is 3. The description does add compositional meaning the schema lacks — that text and name can be combined, that selector replaces text search rather than augmenting it, and that discover targets overlay panels — but it says nothing about kind, exact, limit, or game_id beyond what the schema already documents.

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 names a specific verb and resource (find visible controls: buttons, links, labels, inputs) and states exactly what it produces (refs for click_ui/interact), which lets an agent place it in the workflow without opening the schema. It is clearly distinguished from the sibling it feeds into rather than restating its own name.

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

Usage Guidelines4/5

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

It routes the agent between two modes explicitly: text/name search by default, 'pass selector to inspect one DOM subtree', or 'discover:true to list overlay panels (mod GUIs)'. The downstream consumer is named (click_ui/interact), giving implied when-to-use context, but there are no explicit exclusions or failure caveats (e.g., when to prefer observe or snapshot instead).

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