Skip to main content
Glama
SsdSalesman

TrendRadar

by SsdSalesman

analyze_sentiment

Assess public sentiment and popularity trends for news topics across major platforms like Zhihu, Weibo, and Douyin. Filter by date range and platform to get sentiment distribution and related news.

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 provided, the description carries the full burden of behavioral disclosure. It reveals deduplication behavior (“本工具会对新闻标题进行去重...实际返回数量可能少于请求的 limit 值”), default values (platforms from config.yaml, date_range defaults to today, include_url defaults to false to save tokens), and display strategy (“默认展示方式:展示完整的分析结果...仅在用户明确要求'总结'时才进行筛选”). These are concrete behavioral traits beyond 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.

Conciseness4/5

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

The description is long, but well-structured with bold headers, a clear flow from purpose to args to examples, and an important note section. The examples repeat some information but are useful for illustrating the intended sequence. It is appropriately sized for the tool's complexity and is front-loaded with the most critical guidance.

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?

The description covers the essential aspects for correct invocation: parameter semantics, default behaviors, the dependence on resolve_date_range for natural-language dates, return format (complementing the output schema), deduplication caveat, and display strategy. No significant gaps remain for an AI agent to effectively use this 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?

Schema description coverage is 0%, but the description's Args section fully compensates by explaining every parameter with formats, defaults, and context. For example, platforms are described with fallback behavior and name mapping, and date_range includes both format and acquisition method. This adds significant meaning beyond the raw schema.

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 opens with a specific verb+resource: “分析新闻的情感倾向和热度趋势” (analyze sentiment and heat trends of news). This clearly states what the tool does and distinguishes it from siblings like analyze_topic_trend by focusing on sentiment analysis. The scope (news, sentiment, trends) is unambiguous.

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 strong usage guidance: it explicitly instructs the agent to call resolve_date_range first when the user uses natural language dates like “本周” or “最近7天”. It also includes recommended call flows with examples. However, it does not explicitly compare alternatives or state when not to use this tool, so a minor gap exists.

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

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