Skip to main content
Glama

find_elements

Parse the screen and return only elements whose label contains a query, optionally filtered by type, so you can locate and click the right UI target immediately.

Instructions

Parse the screen and return only the elements whose label contains query (case-insensitive substring; empty query = all), optionally filtered by type (button, link, text, icon, …). One call instead of parse_screen + scanning 300 elements. The ids are valid for click_element(id) right away (this IS the most recent parse).

Returns {"ok", "instance", "vision", "query", "type", "count": total matches, "elements": [{id, type, label, interactive, center}, …] (first limit, 1–100), "truncated"}. "count": 0 is an honest answer (the text is not on screen, or OCR did not read it — screenshot to check). Fails (isError) like parse_screen; in vision mode 'none' it fails with the fix (no grounding backend: screenshot and reason yourself).

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": {
      "query": "<query>"
    },
    "name": "find_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo
limitNo
queryYes
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the match semantics (case-insensitive substring), the truncation behavior via `limit` and `truncated`, honest zero-match semantics, the error path (isError like parse_screen), and the vision-mode dependency with its fix. This is exactly the behavioral context annotations would otherwise provide.

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?

Front-loaded with the core behavior and the sibling contrast, and most parentheticals earn their place. The inline restatement of the return envelope is somewhat redundant given a real output schema exists, which keeps it from a 5, but nothing is padded.

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?

Covers matching semantics, filtering, pagination/truncation, error behavior, and the vision-mode prerequisite — ample for a screen-parsing tool. The only real gap is the unexplained `instance` parameter for multi-instance setups; return values are otherwise already covered by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It defines `query` (case-insensitive substring, empty = all), `type` (button, link, text, icon, …), and the `limit` range (1–100, first N of the matches). The `instance` parameter is never explained, leaving one of four params undocumented in both schema and description.

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?

States a specific verb (parse the screen) and narrows the result set (only elements whose label contains `query`, optionally filtered by `type`), and explicitly contrasts itself with parse_screen + manual scanning. An agent can distinguish it from parse_screen without opening either schema.

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

Usage Guidelines5/5

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

Names the alternative it replaces (parse_screen followed by scanning 300 elements) and gives decision-relevant conditions: empty query returns all, count=0 means the text genuinely isn't there and screenshotting is the next step, and vision mode 'none' fails with the remedy. It also states the returned ids are immediately usable with click_element(id).

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