Skip to main content
Glama

analyze_sentiment

Analyze sentiment and trend patterns in news articles to understand public opinion and topic popularity across platforms.

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
topicNo
platformsNo
date_rangeNo
limitNo
sort_by_weightNo
include_urlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/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 effectively describes key behaviors: it mentions title deduplication ('会对标题去重'), token-saving considerations ('节省token'), and default values for parameters. It also hints at output format ('JSON格式的分析结果'). However, it lacks details on rate limits, authentication needs, or error handling.

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 and front-loaded with the core purpose, followed by usage advice, parameter details, return information, and an example. Every sentence adds value without redundancy, and the bullet-point format for parameters enhances readability while maintaining brevity.

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 tool's complexity (6 parameters, no annotations, but has output schema), the description is highly complete. It covers purpose, usage guidance, parameter semantics, and output format. The presence of an output schema means the description doesn't need to detail return values, and it adequately addresses the gaps left by the lack of annotations and low schema coverage.

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 schema description coverage is 0%, so the description must fully compensate. It does so excellently by explaining all 6 parameters in detail: purpose, format, defaults, constraints (e.g., '最大100'), and practical implications (e.g., '节省token'). This adds significant meaning beyond the bare schema, making parameter usage clear.

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 purpose: '分析新闻的情感倾向和热度趋势' (analyze sentiment and heat trends of news). It specifies the resource (news) and the specific analysis performed (sentiment and heat trends), distinguishing it from siblings like 'analyze_topic_trend' or 'get_trending_topics' which might focus on different aspects of news analysis.

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 clear context for usage with the suggestion to call 'resolve_date_range' for natural language dates, which is helpful guidance. However, it does not explicitly state when to use this tool versus alternatives like 'analyze_topic_trend' or 'aggregate_news', leaving some ambiguity about sibling differentiation.

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

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