Skip to main content
Glama
guanyuyan
by guanyuyan

web_watch

Monitors web pages or specific page sections for changes by comparing each fetch to a saved snapshot, then returns whether content changed and a line-level diff summary.

Instructions

检测网页(或页面内某个区块)自上次调用以来的变化。

每次成功抓取都会保存一份正文快照,下次调用与它对比,返回 changed 与增删行摘要, 适合"每天看一眼这个页面有没有新内容"的场景;无变化时 changed=false 且 diff 为空。 抓取失败(拦截/超时/登录墙)不会覆盖旧快照,等问题解决后仍能对比到真实变化。

Args: url: 目标网页完整 URL。 selector: 只看页面内的某个区块(CSS 选择器),如 "main .article";不传则对比整页正文。 reset: 丢弃该 URL 的旧快照并重建基线(本次返回 first_seen=true)。 bypass_cache: 默认 true,强制拿最新内容;false 时允许命中 CACHE_TTL 内的正文缓存。 session: 登录态会话名(默认 default);需与 login 时使用的会话名一致。 deadline_ms: 整次调用的总预算(毫秒),不传表示不限。 proxy: 本次请求使用的代理;不传则按代理池分配,未配池时沿用全局配置。

Input Schema

NameRequiredDescriptionDefault
urlYes
proxyNo
resetNo
sessionNodefault
selectorNo
deadline_msNo
bypass_cacheNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.19.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that a snapshot is saved per successful fetch, that failures (blocking/timeout/login wall) do not overwrite the old snapshot, that reset rebuilds the baseline and returns first_seen=true, and how caching interacts with bypass_cache. Missing are concurrency/rate-limit expectations and what happens on the very first call for a URL, but the stateful semantics are unusually well surfaced.

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?

Purpose and statefulness are front-loaded, then failure/snapshot behavior, then an Args block that maps one-to-one onto the schema. The Args block is long but each line carries operational meaning; there is no filler or repeated information.

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 a 7-parameter stateful tool with no annotations, the definition covers persistence model, failure handling, first-call/baseline behavior, caching, session coupling, and proxy/deadline semantics, and an output schema exists so return shape need not be restated. An agent has enough to call this correctly on the first attempt.

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, and it documents all seven parameters in ways the schema cannot: reset returns first_seen=true, bypass_cache defaults to true and lets CACHE_TTL content be reused, session must match the name used at login, deadline_ms is a total call budget, and proxy falls back to the pool or global config. This adds genuine meaning beyond types and defaults.

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

Purpose4/5

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

States a specific verb and resource: detect changes in a page (or a block within it) since the last call, with snapshot-based diffing. This is clearly a stateful watch tool rather than a plain fetch, so an agent can distinguish it from web_fetch/web_crawl in practice. It never names those alternatives explicitly, which keeps it just short of a 5.

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?

Gives a concrete usage scenario ("每天看一眼这个页面有没有新内容") and the conditions that change the behavior for reset and bypass_cache. It also ties session usage to the login tool ("需与 login 时使用的会话名一致"), which is a real routing constraint. No explicit when-not-to-use or alternative-tool guidance is given.

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