extract_element_data
Extract text or HTML attributes from any page element using CSS selectors for precise data retrieval from webpages.
Instructions
Extract text content or HTML attributes from page elements using CSS selectors.
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": {
"action": "<action>",
"selector": "<selector>"
},
"name": "extract_element_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab ID (optional) | |
| action | Yes | Extraction type | |
| selector | Yes | CSS selector | |
| attributeName | No | Attribute name (Required for action="attribute") |