Skip to main content
Glama

search_news

Search and filter news from Chinese social platforms and RSS feeds using keyword, fuzzy, or entity modes; specify date ranges, platforms, and sorting to retrieve relevant articles with optional URLs.

Instructions

统一搜索接口,支持多种搜索模式,可同时搜索热榜和RSS

建议:使用自然语言日期时,先调用 resolve_date_range 获取精确日期范围。

Args: query: 搜索关键词或内容片段 search_mode: 搜索模式 - "keyword": 精确关键词匹配(默认) - "fuzzy": 模糊内容匹配 - "entity": 实体名称搜索(人物/地点/机构) date_range: 日期范围,格式 {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"},默认今天 platforms: 平台ID列表,如 ['zhihu', 'weibo'],不指定则使用所有平台 limit: 热榜返回条数限制,默认50 sort_by: 排序方式 - "relevance"(相关度)/ "weight"(权重)/ "date"(日期) threshold: 相似度阈值(仅fuzzy模式),0-1,默认0.6 include_url: 是否包含URL链接,默认False include_rss: 是否同时搜索RSS数据,默认False rss_limit: RSS返回条数限制,默认20

Returns: JSON格式的搜索结果,包含热榜新闻列表和可选的RSS结果

Examples: - search_news(query="AI") - search_news(query="AI", include_rss=True) - search_news(query="特斯拉", date_range={"start": "2025-01-01", "end": "2025-01-07"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
sort_byNorelevance
platformsNo
rss_limitNo
thresholdNo
date_rangeNo
include_rssNo
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?

注解未提供,因此描述承担了行为透明度的全部责任。描述详细说明了搜索模式的差异、threshold仅在fuzzy模式生效、是否包含RSS和URL、返回JSON结果等行为。尽管未明确声明为只读操作,但搜索性质暗示了无副作用,也缺少数额限制或认证需求,但整体行为透明且有具体细节。相比完全没有说明的工具,这个已足够。

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?

描述虽长,但结构化良好:先概述,再给建议,然后列出参数、返回值、示例,层次分明。每个句子都承载必要信息,没有冗余。对于10个参数且模式覆盖率0%的场景,这种详细程度是合理的。不过开头部分已足够简洁,可视为高信息密度。

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?

工具复杂度高,参数多,但描述覆盖了所有参数的含义、默认值、可选范围,说明了返回JSON内容,并推荐了辅助工具resolve_date_range,提供了示例。尽管未细化返回的具体字段结构,但系统提示存在输出模式,因此描述无需完全重复返回值细节。整体上足以指导智能体正确调用。

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?

输入模式对参数的描述覆盖率为0%,描述中通过Args部分详细解释了每个参数的含义、可选值及默认值(如search_mode的三种模式、date_range的格式示例、limit默认50等)。还给出了示例用法,完全弥补了模式的不足。对于10个参数,描述提供了充分的语义,甚至有额外的指引(如threshold仅用于fuzzy)。

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?

明确说明这是一个统一搜索接口,支持关键词、模糊、实体搜索模式,并可同时搜索热榜和RSS。清晰区分了与search_rss等兄弟工具,因为它明确涵盖了两者,而其他工具可能专一于某一部分。动词'搜索'和资源'新闻'明确,且提供了多种模式说明,具有很强的区分度。

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?

明确建议在自然语言日期时先调用resolve_date_range获取精确日期范围,提供了具体的场景用法。但未强调何时使用其他兄弟工具(如get_latest_news、get_trending_topics),缺少了当使用替代工具的明确指引。虽然未说'不用这个时用哪个',但给出了一个前置条件的建议,属于清晰上下文,但无排他性指引。

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/AY08siliang/TrendRadar'

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