web_watch
Detect webpage or section changes since the last call by saving snapshots and returning added/removed line diffs; optionally compare extracted fields such as prices across versions.
Instructions
检测网页(或页面内某个区块)自上次调用以来的变化。
每次成功抓取都会保存一份快照(按时间序列保留,多版本可回溯),下次调用与最新版
对比,返回 changed 与增删行摘要,适合"每天看一眼这个页面有没有新内容"的场景;
无变化时 changed=false 且 diff 为空。
传 schema 时额外抽取字段并做字段级对比(价格从 299 变成 249 这类变化更直观),
字段随快照一起保存,供 web_changes 跨版本比较。
抓取失败(拦截/超时/登录墙)不会覆盖旧快照,等问题解决后仍能对比到真实变化。
Args: url: 目标网页完整 URL。 selector: 只看页面内的某个区块(CSS 选择器),如 "main .article";不传则对比整页正文。 reset: 丢弃该 URL 的旧快照并重建基线(本次返回 first_seen=true)。 bypass_cache: 默认 true,强制拿最新内容;false 时允许命中 CACHE_TTL 内的正文缓存。 session: 登录态会话名(默认 default);需与 login 时使用的会话名一致。 deadline_ms: 整次调用的总预算(毫秒),不传表示不限。 proxy: 本次请求使用的代理;不传则按代理池分配,未配池时沿用全局配置。 schema: 可选的字段抽取规则(同 web_extract);提供后快照会附带字段数据, 变化时返回 changes(字段增删改,数值带 delta/pct)与 summary_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": {
"url": "<url>"
},
"name": "web_watch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| proxy | No | ||
| reset | No | ||
| schema | No | ||
| session | No | default | |
| selector | No | ||
| deadline_ms | No | ||
| bypass_cache | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |