get_attribute
Retrieve the value of a specified attribute from the first web page element that matches a given CSS or XPath selector.
Instructions
Return the value of an attribute on the first element matching the selector.
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 | CSS or XPath selector. | |
| attribute | Yes | Attribute name, e.g. href, src, value, data-id. |