Skip to main content
Glama

analyze_sentiment

Analyze news sentiment and popularity trends for a topic across platforms and date ranges. Get sentiment distribution, trend data, and related articles to gauge public opinion.

Instructions

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

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

Args: topic: 话题关键词(可选) platforms: 平台ID列表,如 ['zhihu', 'weibo'],不指定则使用所有平台 date_range: 日期范围,格式 {"start": "YYYY-MM-DD", "end": "YYYY-MM-DD"},默认今天 limit: 返回新闻数量,默认50,最大100(会对标题去重) sort_by_weight: 是否按热度权重排序,默认True include_url: 是否包含URL链接,默认False(节省token)

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

Examples: - analyze_sentiment(topic="AI", date_range={"start": "2025-01-01", "end": "2025-01-07"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
topicNo
platformsNo
date_rangeNo
include_urlNo
sort_by_weightNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses behavioral traits such as title deduplication ('会对标题去重'), token saving for include_url ('节省token'), defaults like '默认今天' and '最大100'. It does not explicitly state read-only status or side effects, but the '分析' wording implies a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is well-structured with a short intro, a recommendation, an Args list, Returns, and an Example. Every section serves a clear purpose without redundancy, making it efficient and front-loaded.

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?

The description covers all six parameters, describes the return value generically ('包含情感分布、热度趋势和相关新闻'), and provides a concrete example. With an output schema available, it does not need to detail every field. It lacks error-handling or edge-case information, but for an analysis tool with optional parameters, it is sufficiently complete.

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?

Although schema_description_coverage is 0%, the description's Args section explains each parameter thoroughly, including formats, defaults, and behaviors (e.g., date_range format, limit max, sort_by_weight default, include_url purpose). This fully compensates for the missing schema descriptions and adds significant semantic value.

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?

The description states '分析新闻的情感倾向和热度趋势' (analyze sentiment tendency and popularity trend of news), which is a specific verb+resource combination that clearly conveys the tool's function. It does not explicitly contrast with sibling tools like analyze_topic_trend or analyze_data_insights, so it lacks explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage recommendation for natural language dates ('建议:使用自然语言日期时,先调用 resolve_date_range 获取精确日期范围'), which helps with a prerequisite step but does not explain when to use this tool over alternatives or exclusions. Usage context is implied by the purpose statement but not made explicit.

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

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