Skip to main content
Glama
computer
by zznabil

Find elements

ax_find
Read-onlyIdempotent

Search a window's accessibility tree by role, title, or value to locate UI elements and get their refs and desktop bounds. Scope searches to a container for faster results in large windows.

Instructions

Query a window's AX tree by role/title/value; returns element records with refs and global desktop bounds. title and value match substrings (case-insensitive); exact matches come first, and exact: true returns only those.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>"
    },
    "name": "ax_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNoRole, e.g. button, textfield.
exactNoOnly elements whose whole title/value equals the given text (case-insensitive, trimmed).
limitNoMax results.
titleNoLabel (substring).
valueNoValue (substring).
targetYesWindow id from list_windows (a "window:<id>" prefix is accepted), "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard.
withinNoRef of a container (from ax_tree/ax_find) to search instead of the whole window. Much faster in big windows: cost grows with the container's size, not the window's.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.11.0
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard."
    • addedInput schema / properties / within
      Added value: +{
      +  "description": "Ref of a container (from ax_tree/ax_find) to search instead of the whole window. Much faster in big windows: cost grows with the container's size, not the window's.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv0.3.3
    • addedInput schema / properties / exact
      Added value: +{
      +  "description": "Only elements whose whole title/value equals the given text (case-insensitive, trimmed).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows, \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."
    • changedInput schema / properties / title / description
      Previous value: -"Label."New value: +"Label (substring)."
    • changedInput schema / properties / value / description
      Previous value: -"Value."New value: +"Value (substring)."
  3. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, not open-world), and the description adds real value beyond them: it discloses the return payload (element refs plus global desktop bounds) and the match ordering behavior (exact matches first). It still does not mention result capping or cost behavior, which keeps it below 5.

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?

A single front-loaded sentence that leads with the purpose and follows with matching semantics and the return shape. Dense but every clause carries information; no filler.

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 seven-parameter read tool with no output schema, the description successfully explains what comes back and how matching works. It omits limit/truncation behavior and the performance implications of scoping via within, though those are partly covered in the parameter descriptions.

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%, so the baseline is 3. The description restates the substring/case-insensitive matching and the exact flag that the schema already documents, adding only the ordering detail that exact matches come first — marginal value beyond the structured fields.

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 specific verb and resource: 'Query a window's AX tree by role/title/value', plus the return shape ('element records with refs and global desktop bounds'). It does not explicitly distinguish itself from siblings like ax_tree, ax_element, or ax_focused, so it falls short of a 5.

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?

Usage is implied by 'Query a window's AX tree by role/title/value', which suggests a filtered lookup, but there is no explicit when-to-use or when-not-to-use guidance and no named alternative (e.g., ax_tree for full dumps). The scoping advice about preferring a window id lives in the target parameter schema, not in the description.

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