查询页面元素
wdt_queryQuery current page elements with a CSS selector and return summaries including tag name, text, id/class, and value; optionally return all matches or limit results.
Instructions
用 CSS 选择器查询当前页面元素,返回 tagName、文本、id/class、value 等摘要。
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>"
},
"name": "wdt_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | 是否返回全部匹配项,默认只返回第一个 | |
| max | No | 最多返回数量,默认 20 | |
| selector | Yes | CSS 选择器,如 .btn 或 #title |