browser_get_text
Retrieve the text content of a web element using CSS, XPath, or other selectors. Specify the session and element to extract targeted text.
Instructions
Get the text content of an element.
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": {
"session_id": "<session_id>"
},
"name": "browser_get_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | The session ID | |
| selector | No | Element selector (CSS selector by default) | body |
| by | No | Selector type (css, xpath, id, name, class, tag) | css |
| max_length | No | Maximum text length to return |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |