Skip to main content
Glama
xhh-im

TrendRadar

by xhh-im

search_news

Search news across multiple platforms using keyword, fuzzy, or entity modes. Filter by date range, platform, and relevance to find specific content.

Instructions

统一搜索接口,支持多种搜索模式

重要:日期范围处理 当用户使用"本周"、"最近7天"等自然语言时,请先调用 resolve_date_range 工具获取精确日期:

  1. 调用 resolve_date_range("本周") → 获取 {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"}

  2. 将返回的 date_range 传入本工具

Args: query: 搜索关键词或内容片段 search_mode: 搜索模式,可选值: - "keyword": 精确关键词匹配(默认,适合搜索特定话题) - "fuzzy": 模糊内容匹配(适合搜索内容片段,会过滤相似度低于阈值的结果) - "entity": 实体名称搜索(适合搜索人物/地点/机构) date_range: 日期范围(可选) - 格式: {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"} - 获取方式: 调用 resolve_date_range 工具解析自然语言日期 - 默认: 不指定时默认查询今天的新闻 platforms: 平台ID列表,如 ['zhihu', 'weibo', 'douyin'] - 不指定时:使用 config.yaml 中配置的所有平台 - 支持的平台来自 config/config.yaml 的 platforms 配置 - 每个平台都有对应的name字段(如"知乎"、"微博"),方便AI识别 limit: 返回条数限制,默认50,最大1000 注意:实际返回数量取决于搜索匹配结果(特别是 fuzzy 模式下会过滤低相似度结果) sort_by: 排序方式,可选值: - "relevance": 按相关度排序(默认) - "weight": 按新闻权重排序 - "date": 按日期排序 threshold: 相似度阈值(仅fuzzy模式有效),0-1之间,默认0.6 注意:阈值越高匹配越严格,返回结果越少 include_url: 是否包含URL链接,默认False(节省token)

Returns: JSON格式的搜索结果,包含标题、平台、排名等信息

Examples: 用户:"搜索本周的AI新闻" 推荐调用流程: 1. resolve_date_range("本周") → {"date_range": {"start": "2025-11-18", "end": "2025-11-26"}} 2. search_news(query="AI", date_range={"start": "2025-11-18", "end": "2025-11-26"})

用户:"最近7天的特斯拉新闻"
推荐调用流程:
1. resolve_date_range("最近7天") → {"date_range": {"start": "2025-11-20", "end": "2025-11-26"}}
2. search_news(query="特斯拉", date_range={"start": "2025-11-20", "end": "2025-11-26"})

用户:"今天的AI新闻"(默认今天,无需解析)
→ search_news(query="AI")

重要:数据展示策略

  • 本工具返回完整的搜索结果列表

  • 默认展示方式:展示全部返回的新闻,无需总结或筛选

  • 仅在用户明确要求"总结"或"挑重点"时才进行筛选

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
sort_byNorelevance
platformsNo
thresholdNo
date_rangeNo
include_urlNo
search_modeNokeyword

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses multiple behavioral traits: search modes, date range handling, limit and threshold effects, default platform config, and return format. With no annotations, the description compensates well for safety and behavior. Could mention error behavior or rate limits but overall strong.

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?

Well-structured with sections, bullet points, examples, and important notes. Front-loaded with purpose. Slightly verbose but every sentence adds value. Could be more concise but organization is effective.

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?

Given 8 parameters, 1 required, and an output schema, the description covers search logic, date workflow, platform configuration, display strategy, and usage examples. Only missing error handling, but output schema likely covers return values. Highly complete for a complex search tool.

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?

With 0% schema coverage, the description fully compensates by explaining every parameter: query, search_mode with options, date_range format and acquisition, platforms with defaults, limit behavior, sort_by options, threshold semantics, and include_url. Adds significant value beyond the schema.

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?

Clearly identifies as a unified search interface with multiple modes (keyword, fuzzy, entity). Distinguishes from siblings like get_latest_news and get_news_by_date by being a general search, but does not explicitly differentiate from find_similar_news or search_related_news_history.

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?

Provides explicit guidance on when to use each search_mode and a detailed workflow for date range resolution using resolve_date_range. Includes default behavior and data display strategy. However, does not explicitly mention when not to use or alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xhh-im/TrendRadar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server