get_attribute
Retrieve the value of a specified attribute from a web element using its CSS selector. Helps extract data like href, src, or data attributes for automation.
Instructions
Get an attribute value from 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": {
"selector": "<selector>",
"attribute": "<attribute>"
},
"name": "get_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| attribute | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |