attr
Fetch an HTML element's named property value, such as href, src, class, data-* or aria-*, and return null when it is absent.
Instructions
[Agent Browser] Get an HTML attribute value from an element. Common attributes: href, src, class, data-, aria-, disabled. Returns null if attribute doesn't exist. Use value() for input values.
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": "attr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| attribute | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| hints | No | ||
| message | No | ||
| success | No | ||
| suggestions | No |