Skip to main content
Glama
guanyuyan
by guanyuyan

web_search

Search keywords to return structured candidate URLs with titles and snippets, so you can find entry points before fetching full page content.

Instructions

搜索关键词,返回结构化的结果列表(标题 / URL / 摘要),不抓结果页正文。

适合"先找入口再抓正文"的两步流程:本工具负责发现候选 URL,正文仍交给 web_fetch。

Args: query: 搜索关键词,不能为空。 max_results: 期望返回条数,超出配置上限 search_max_results 时按上限截断。 provider: 搜索后端。duckduckgo=HTML 端点,无需 key(默认,取配置 search_provider); searxng=自托管实例的 JSON API,需设置 SCRAPE_MCP_SEARCH_SEARXNG_URL。 bypass_cache: 跳过并绕过搜索结果缓存,强制现查。 deadline_ms: 整次调用的总预算(毫秒),不传表示不限。 proxy: 本次请求使用的代理;不传则按代理池分配,未配池时沿用全局配置。

Input Schema

NameRequiredDescriptionDefault
proxyNo
queryYes
providerNo
deadline_msNo
max_resultsNo
bypass_cacheNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.0

TDQS

A5/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 burden and does so: it discloses cache behavior (bypass_cache 强制现查), truncation at the config cap search_max_results, the external prerequisite for searxng (SCRAPE_MCP_SEARCH_SEARXNG_URL), per-call time budget via deadline_ms, and automatic proxy-pool assignment. These are exactly the operational facts an agent cannot infer from the schema.

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

Conciseness5/5

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

Front-loaded with the one-line purpose and the workflow routing, then a compact Args block that must exist because the schema has zero descriptions. Every line adds information; the only near-redundancy is noting query 不能为空, which the required list already implies.

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?

Output schema is present, so the description needn't detail return values, and it still gives the result shape in one clause. For a six-parameter tool with no annotations and a config-dependent provider, all the decision-relevant context an agent needs is present.

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 six parameters with meaning beyond type: provider enumerates duckduckgo vs searxng plus each one's requirement, max_results explains cap-based truncation, bypass_cache explains cache semantics, deadline_ms is a total-call budget, proxy explains pool fallback to global config.

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 concrete verb and resource (搜索关键词,返回结构化的结果列表 with title/URL/snippet) and immediately delimits scope by declaring 不抓结果页正文. That single exclusion makes it trivially distinguishable from web_fetch/web_extract siblings.

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

Usage Guidelines5/5

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

Explicitly frames the two-step workflow: this tool discovers candidate URLs, and 正文仍交给 web_fetch. Both the when-to-use and the hand-off alternative are named, leaving nothing to inference.

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