Skip to main content
Glama
scrape-mcp
by guanyuyan

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

NameRequiredDescriptionDefault
urlYes
proxyNo
resetNo
schemaNo
sessionNodefault
selectorNo
deadline_msNo
bypass_cacheNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.35.0
    • addedInput schema / properties / schema
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Schema"
      +}
  2. Addedv0.19.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does so thoroughly: it discloses that every successful fetch persists a time-series snapshot, that comparison is against the latest version, that failed fetches (blocked/timeout/login wall) do not overwrite the old baseline, that reset rebuilds the baseline and returns first_seen=true, and that bypass_cache controls whether the CACHE_TTL body cache is used. That is the kind of state-and-failure semantics an agent needs before calling a stateful tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded and the Args block is justified by the total absence of schema descriptions. A few lines are slightly redundant with the return-value discussion (changed/diff stated twice), but nothing is padding and structure is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an eight-parameter, stateful tool with no annotations, the definition covers purpose, snapshot lifecycle, failure behavior, cache semantics, auth/session linkage, and the shape of the result (changed, diff, changes, summary_text, first_seen). An output schema exists, so return-value detail is not required, and nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate entirely, and it does: all eight parameters are explained with meaning beyond their names — selector with a CSS example and the whole-page default, reset with its first_seen consequence, bypass_cache with its default and cache-window behavior, session with the requirement that it match the login session name, deadline_ms as a total call budget, proxy with pool-allocation fallback, and schema with field-level diff output including delta/pct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a precise verb and resource: detect changes to a web page (or a block within it) since the last call. It further scopes the tool by naming its sibling relationships (web_changes for cross-version comparison, web_extract for schema rules), so an agent can place it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a concrete usage scenario ('checking whether a page has new content each day') and explains what happens when nothing changed (changed=false, empty diff). It also points to web_changes for multi-version comparison. However, it never states when NOT to use this tool — e.g. that a one-off fetch should go to web_fetch — so the alternative is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.