Skip to main content
Glama

analyze_topic_trend

Analyze how a topic's popularity evolves, detect sudden spikes, and forecast future trends using multiple analytical modes.

Instructions

统一话题趋势分析工具 - 整合多种趋势分析模式

Args: topic: 话题关键词(必需) analysis_type: 分析类型,可选值: - "trend": 热度趋势分析(追踪话题的热度变化) - "lifecycle": 生命周期分析(从出现到消失的完整周期) - "viral": 异常热度检测(识别突然爆火的话题) - "predict": 话题预测(预测未来可能的热点) date_range: 日期范围(trend和lifecycle模式),可选 - 格式: {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"}(必须是标准日期格式) - 说明: AI必须根据当前日期自动计算并填入具体日期,不能使用"今天"等自然语言 - 计算示例: - 用户说"最近7天" → AI计算: {"start": "2025-11-11", "end": "2025-11-17"}(假设今天是11-17) - 用户说"上周" → AI计算: {"start": "2025-11-11", "end": "2025-11-17"}(上周一到上周日) - 用户说"本月" → AI计算: {"start": "2025-11-01", "end": "2025-11-17"}(11月1日到今天) - 默认: 不指定时默认分析最近7天 granularity: 时间粒度(trend模式),默认"day"(仅支持 day,因为底层数据按天聚合) threshold: 热度突增倍数阈值(viral模式),默认3.0 time_window: 检测时间窗口小时数(viral模式),默认24 lookahead_hours: 预测未来小时数(predict模式),默认6 confidence_threshold: 置信度阈值(predict模式),默认0.7

Returns: JSON格式的趋势分析结果

AI使用说明: 当用户使用相对时间表达时(如"最近7天"、"过去一周"、"上个月"), AI必须根据当前日期(从环境 获取)计算出具体的 YYYY-MM-DD 格式日期。

重要:date_range 不接受"今天"、"昨天"等自然语言,必须是 YYYY-MM-DD 格式!

Examples (假设今天是 2025-11-17): - 用户:"分析AI最近7天的趋势" → analyze_topic_trend(topic="人工智能", analysis_type="trend", date_range={"start": "2025-11-11", "end": "2025-11-17"}) - 用户:"看看特斯拉本月的热度" → analyze_topic_trend(topic="特斯拉", analysis_type="lifecycle", date_range={"start": "2025-11-01", "end": "2025-11-17"}) - analyze_topic_trend(topic="比特币", analysis_type="viral", threshold=3.0) - analyze_topic_trend(topic="ChatGPT", analysis_type="predict", lookahead_hours=6)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
thresholdNo
date_rangeNo
granularityNoday
time_windowNo
analysis_typeNotrend
lookahead_hoursNo
confidence_thresholdNo

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: it states that granularity only supports 'day' due to data aggregation, that date_range must be in YYYY-MM-DD format (no natural language), and the return format is JSON. No contradictions.

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 structured with sections, bullet points, and examples, making it easy to parse. It is slightly lengthy but every sentence contributes meaningful guidance. Could be slightly more streamlined but still 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 the output schema exists, the description does not need to detail return values. It covers all 8 parameters, usage patterns, edge cases (like calculating dates), and includes multiple examples. It is complete for an AI agent to invoke the tool correctly.

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 thoroughly explains each parameter: analysis_type with all four values and their meanings, date_range format and calculation rules, granularity constraint, threshold, time_window, lookahead_hours, confidence_threshold. It adds significant value beyond the bare 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 clearly states '统一话题趋势分析工具' (unified topic trend analysis tool) and lists multiple analysis modes (trend, lifecycle, viral, predict), distinguishing it from sibling tools like analyze_sentiment or get_trending_topics.

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?

The description provides explicit guidance on when to use each analysis_type, and crucially instructs the AI to calculate date_range from relative time expressions using the current date, with examples. This goes beyond basic usage to handle a common user input pattern.

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

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