Extract page elements
extract_elementsExtract structured data from web page elements using CSS selectors. Provides a safe alternative to raw JavaScript evaluation in Chrome browser automation.
Instructions
Extract bounded structured data from elements selected by CSS selector. Safer alternative to raw JavaScript evaluation.
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": {
"selector": "<selector>"
},
"name": "extract_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| tabId | No | Optional Chrome tab id. Defaults to the claimed session tab, then the active tab. | |
| visible | No | ||
| selector | Yes | ||
| documentId | No | Exact frame document id returned by list_frames. Omit to target the current top document. | |
| includeHtml | No | ||
| includeText | No | ||
| includeLinks | No | ||
| includeTimes | No | ||
| sessionTabId | No | Optional claimed tab session id returned by claim_tab. |