Skip to main content
Glama
guanyuyan
by guanyuyan

web_map

Discover crawlable URLs for a site by merging sitemap and homepage links, with optional search results and regex filtering, even when no sitemap exists.

Instructions

发现站点 URL:sitemap + 入口页站内链接,可选合并搜索结果。

与 web_index 的区别:web_index 做增量清单对比,web_map 只负责"尽快列出这个站有哪些 可抓的 URL"。无 sitemap 的站点也能从入口页链接得到候选;同一 URL 只出现一次, 并标出来源(sitemap / homepage / search)。

Args: url: 站点根或任意页面 URL;也可直接给 sitemap 地址(此时不再抓入口页链接)。 include: 只保留 URL 匹配该正则的条目;不传不过滤。 exclude: 排除 URL 匹配该正则的条目;不传不排除。 search: 只保留 URL 中匹配该子串的条目(大小写不敏感);不传不过滤。 limit: 最多返回多少条 URL(默认 500,硬上限 5000)。 homepage: True 时抓入口页并提取站内链接(默认 True)。 use_search: True 时额外用 web_search 查 site:<host> 合并结果(默认 False)。 session: 抓入口页时使用的登录态会话名(默认 default)。 deadline_ms: 整次调用的总预算(毫秒),不传表示不限。 proxy: 本次所有请求共用的代理;不传则按代理池分配,未配池时沿用全局配置。

Input Schema

NameRequiredDescriptionDefault
urlYes
limitNo
proxyNo
searchNo
excludeNo
includeNo
sessionNodefault
homepageNo
use_searchNo
deadline_msNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.0

TDQS

A4.4/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 well: it discloses deduplication ('same URL appears only once'), source tagging (sitemap/homepage/search), the default limit of 500 with a hard cap of 5000, proxy-pool allocation behavior, session usage for the entry page, and that use_search triggers an extra web_search call. It stops short of describing failure modes, rate limiting, or required permissions.

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 purpose and the sibling distinction are front-loaded before the Args block, and each line earns its place given 10 parameters. The Args list is long but proportionate; only the proxy and deadline descriptions are slightly verbose relative to their importance.

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

Completeness4/5

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

For a 10-parameter discovery tool, the description plus the existing output schema cover what an agent needs to call it correctly and interpret results. Missing only error/retry behavior and any statement that it performs no mutation, which are minor given the read-only nature of URL discovery.

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 does: every one of the 10 parameters gets semantics beyond the schema — include/exclude are regex filters with 'no filter if omitted', search is a case-insensitive substring filter, url may itself be a sitemap address (suppressing entry-page crawling), and defaults/hard caps are spelled out.

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?

States a specific verb+resource: discover crawlable site URLs via sitemap plus entry-page internal links, optionally merging search results. It explicitly contrasts with the sibling web_index ('web_index does incremental list diff; web_map just lists what URLs this site has'), so an agent can route between the two without opening either 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?

The web_index comparison establishes when to choose this tool, and it covers the fallback case (sites with no sitemap still yield candidates from entry-page links). It does not state explicit when-not conditions or mention other plausible alternatives such as web_crawl or web_search for other purposes, leaving some inference to the agent.

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