Skip to main content
Glama
xhh-im

TrendRadar

by xhh-im

analyze_sentiment

Assess news sentiment and trending intensity across platforms like Zhihu, Weibo, and Douyin, delivering comprehensive analysis for any topic over a specified period.

Instructions

分析新闻的情感倾向和热度趋势

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

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

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

Args: topic: 话题关键词(可选) platforms: 平台ID列表,如 ['zhihu', 'weibo', 'douyin'] - 不指定时:使用 config.yaml 中配置的所有平台 - 支持的平台来自 config/config.yaml 的 platforms 配置 - 每个平台都有对应的name字段(如"知乎"、"微博"),方便AI识别 date_range: 日期范围(可选) - 格式: {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"} - 获取方式: 调用 resolve_date_range 工具解析自然语言日期 - 默认: 不指定则默认查询今天的数据 limit: 返回新闻数量,默认50,最大100 注意:本工具会对新闻标题进行去重(同一标题在不同平台只保留一次), 因此实际返回数量可能少于请求的 limit 值 sort_by_weight: 是否按热度权重排序,默认True include_url: 是否包含URL链接,默认False(节省token)

Returns: JSON格式的分析结果,包含情感分布、热度趋势和相关新闻

Examples: 用户:"分析AI本周的情感倾向" 推荐调用流程: 1. resolve_date_range("本周") → {"date_range": {"start": "2025-11-18", "end": "2025-11-26"}} 2. analyze_sentiment(topic="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. analyze_sentiment(topic="特斯拉", date_range={"start": "2025-11-20", "end": "2025-11-26"})

重要:数据展示策略

  • 本工具返回完整的分析结果和新闻列表

  • 默认展示方式:展示完整的分析结果(包括所有新闻)

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
topicNo
platformsNo
date_rangeNo
include_urlNo
sort_by_weightNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: deduplication of news, default values, data display strategy, and the procedure for obtaining date ranges. This ensures the AI agent can invoke the tool correctly.

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 description is well-structured with headers, bullet points, and examples, making it easy to parse. However, it is somewhat lengthy, and the data display strategy section could be more concise.

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 the 6 parameters and optionality, the description covers all necessary information: parameter details, usage flows, and behavioral notes. The existence of an output schema reduces the need to describe return values.

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?

The input schema has 0% description coverage, so the description provides complete semantic meaning for all 6 parameters, including examples and default behaviors. This fully compensates for the schema's lack of descriptions.

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?

The description clearly states the tool's function: analyzing sentiment and heat trends of news. It distinguishes itself from sibling tools like 'analyze_topic_trend' by focusing specifically on sentiment and heat. The examples reinforce this purpose.

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 description provides detailed usage guidelines, including when to call 'resolve_date_range' for natural language dates, and default behaviors like platform selection. However, it does not explicitly compare with sibling tools or state when not to use this tool.

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