xpath_tool
Extract data from HTML using simple XPath expressions like //div, //a[@href], or //title/text(). Count matches or return extracted text.
Instructions
简易 XPath 提取:支持 //tag、tag、tag[@attr="value"]、/text() 形式(基于正则的轻量实现,不支持复杂轴表达式)
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": {
"html": "<html>",
"xpath": "<xpath>"
},
"name": "xpath_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| xpath | Yes | 如 //div、//a[@href] 或 //title/text() | |
| action | No | extract |