Skip to main content
Glama

Find By Text

find_by_text

Locate UI elements by visible text and return their ARIA index in one call, with role hints to resolve ambiguous button, link, or textbox matches.

Instructions

Fuzzy "the button/link that says X" → ARIA idx, in one call. Skip aria_snapshot. role_hint='button'|'link'|'textbox' to disambiguate.

Ex: find_by_text('t0', 'Sign in', role_hint='button') → {"idx":3,"found":true}

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": {
      "tab_id": "<tab_id>",
      "text": "<text>"
    },
    "name": "find_by_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
tab_idYes
role_hintNo
force_refreshNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose meaningful behavior: the match is fuzzy, it works in one call, and the return shape is {idx, found}. However it says nothing about the force_refresh parameter's side effects, latency/caching behavior, or what circumstances produce found=false, which are the traits an agent most needs before calling a browser-automation 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?

Front-loaded with the core value proposition, then the disambiguation parameter, then a concrete example — a clean three-beat structure with no filler. The arrow/telegraphic style is terse but readable; the only cost is that some clauses read as notes rather than prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the description needn't explain return values in depth, and the example covers the happy path. Still, for a 4-parameter browser tool with no annotations, the omission of force_refresh semantics and of failure/not-found behavior leaves a real gap an agent could stumble on.

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 0%, so the description must compensate and it only partly does. It clarifies text (fuzzy match), narrows role_hint to button|link|textbox (a constraint the schema does not encode as an enum), and demonstrates tab_id via the example; force_refresh is entirely undocumented in both schema and description.

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?

States a concrete verb+resource: fuzzy text match on a page element returning an ARIA idx, in a single call. It also implicitly separates itself from aria_snapshot ('Skip aria_snapshot') and from structural tools like dom_query/inspect_element by emphasizing fuzzy text targeting. It stops short of saying what the returned idx is used for (e.g. aria_click), so a 4 rather than 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 Guidelines4/5

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

'Skip aria_snapshot' gives a clear condition for choosing this tool over the cheaper-to-describe sibling, and role_hint is framed as the disambiguation lever when the text alone is ambiguous. There is no explicit statement of when not to use it (e.g. for stable selectors, use dom_query), but the intended usage context is unmistakable.

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