find_elements
Discover controls when you need to choose among them, troubleshoot, or obtain selectors. List visible interactive elements (links, buttons, inputs, selects) with CSS selectors, text, placeholders, names, and disabled state. Use the selectors with click, type_text, and wait_for. Returns up to limit (default 40) to keep the result small — narrow it with contains (only elements whose text/label/placeholder/name include this) and tag (e.g. only "button" or "input") instead of pulling the whole page; the result's truncated/matched tell you if more were filtered out.
Example#
Call this MCP tool with the argument object below. Replace illustrative IDs, selectors, local paths, and project URLs with values observed in your session.
{
"tag": "button",
"limit": 20
}Result#
Returns visible matching controls with selectors and useful state, plus counts and truncation information. Use returned targets rather than guessing selectors.
Results arrive in MCP content blocks. Most structured results are JSON in text blocks; image tools can include image blocks. Handle errors and partial or truncated data. No formal output schema is declared for this tool.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
within | string or object | No | See usage and full schema below. |
contains | string | No | Only elements whose text, aria-label, placeholder, or name contains this (case-insensitive) |
tag | string | No | Only this tag: button (also matches role=button), a, input, textarea, select |
limit | number | No | Max elements to return (default 40, cap 150) |
frame | string | No | Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with " >> ", e.g. "#checkout >> iframe[name=card]". minLength: 1 |
tab | string | No | Tab name or id in your workspace; does not change the visible tab. minLength: 1 |
Full input schema#
The schema includes nested shapes and constraints. Additional semantic constraints can apply at runtime; read the description and usage notes.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"within": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "object",
"properties": {
"heading": {
"type": "string",
"minLength": 1
}
},
"required": [
"heading"
],
"additionalProperties": false
}
]
},
"contains": {
"description": "Only elements whose text, aria-label, placeholder, or name contains this (case-insensitive)",
"type": "string"
},
"tag": {
"description": "Only this tag: button (also matches role=button), a, input, textarea, select",
"type": "string"
},
"limit": {
"description": "Max elements to return (default 40, cap 150)",
"type": "number"
},
"frame": {
"description": "Act inside an iframe: selector of the <iframe> element (find_elements/read_page/get_page_text list them). Nested frames chain with \" >> \", e.g. \"#checkout >> iframe[name=card]\".",
"type": "string",
"minLength": 1
},
"tab": {
"description": "Tab name or id in your workspace; does not change the visible tab.",
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}Related documentation#
Reference conventions · Agent operating guide · Troubleshooting