Skip to main content
Glama

find_text

Read-onlyIdempotent

Locate literal text on a page when you know the words but not the selector; returns matches with parent, visibility, position, and refs to nearby interactive elements.

Instructions

Find text on the page: parent selector, context, visibility, position per match. Attaches nearby interactive elements (with refs for click/type_text/hover) for the first visible match. Use it when you know the words on screen but not the selector (query_dom needs one); no match returns count 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesLiteral text to find, not a regex
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
max_resultsNoCap on matches returned, in document order
case_sensitiveNoMatch case exactly

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.10.0
    • addedInput schema / properties / case_sensitive / description
      Added value: +"Match case exactly"
    • addedInput schema / properties / max_results / description
      Added value: +"Cap on matches returned, in document order"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
    • addedInput schema / properties / text / description
      Added value: +"Literal text to find, not a regex"
  2. First observedv1.8.0

TDQS

A4.3/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), so the bar is lower. The description goes beyond them by disclosing that interactive elements are attached with refs usable by click/type_text/hover and only for the first visible match, plus the count-0 failure signal. It stops short of describing ordering limits or result sizes.

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?

Three sentences, all load-bearing, with the behavior front-loaded ahead of the when-to-use routing. The first sentence is telegraphic to the point of being terse ('root selector, parent selector, context, visibility, position per match'), which compresses rather than clarifies, but nothing is wasted.

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?

There is no output schema, so the description must carry the return-value burden, and it does list the salient fields plus the ref-bearing interactives and the zero-match case. Minor gaps remain around result ordering/pagination and how many nearby elements are attached.

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 schema already documents text, tab_id, max_results, and case_sensitive. The description only hints at matching semantics ('the words on screen') and adds no syntax or default detail beyond the schema; baseline 3 applies.

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?

Specific verb+resource ('Find text on the page') plus an enumerated result shape (parent selector, context, visibility, position) and the side effect of attaching nearby interactives. It is clearly distinguishable from query_dom, which it explicitly contrasts.

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?

Gives both the selecting condition ('when you know the words on screen but not the selector') and names the alternative with its constraint ('query_dom needs one'). It also states the no-match outcome, so the agent knows what a zero-result call looks like.

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