Skip to main content
Glama
baranwang

Trends Hub

get-weibo-trending

Retrieve real-time trending topics from Weibo's hot search list to monitor Chinese social media discussions about current events, entertainment, and popular culture.

Instructions

获取微博热搜榜,包含时事热点、社会现象、娱乐新闻、明星动态及网络热议话题的实时热门中文资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function fetches Weibo trending topics from 'https://weibo.com/ajax/side/hotSearch', filters out ads, formats each topic with title, description, popularity, and search link.
    func: async () => {
      const resp = await http.get<{
        ok: number;
        data: {
          realtime: any[];
        };
      }>('https://weibo.com/ajax/side/hotSearch');
      if (resp.data.ok !== 1 || !Array.isArray(resp.data.data.realtime)) {
        throw new Error('获取微博热搜榜失败');
      }
      return resp.data.data.realtime
        .filter((item) => item.is_ad !== 1)
        .map((item: any) => {
          const key = item.word_scheme || `#${item.word}`;
          const url = new URL('https://s.weibo.com/weibo');
          url.searchParams.set('q', key);
          url.searchParams.set('band_rank', '1');
          url.searchParams.set('Refer', 'top');
          return {
            title: item.word,
            description: item.note || key,
            popularity: item.num,
            link: url.toString(),
          };
        });
    },
  • Tool registration using defineToolConfig, defining name 'get-weibo-trending', description, and references the handler function.
    export default defineToolConfig({
      name: 'get-weibo-trending',
      description: '获取微博热搜榜,包含时事热点、社会现象、娱乐新闻、明星动态及网络热议话题的实时热门中文资讯',
      func: async () => {
        const resp = await http.get<{
          ok: number;
          data: {
            realtime: any[];
          };
        }>('https://weibo.com/ajax/side/hotSearch');
        if (resp.data.ok !== 1 || !Array.isArray(resp.data.data.realtime)) {
          throw new Error('获取微博热搜榜失败');
        }
        return resp.data.data.realtime
          .filter((item) => item.is_ad !== 1)
          .map((item: any) => {
            const key = item.word_scheme || `#${item.word}`;
            const url = new URL('https://s.weibo.com/weibo');
            url.searchParams.set('q', key);
            url.searchParams.set('band_rank', '1');
            url.searchParams.set('Refer', 'top');
            return {
              title: item.word,
              description: item.note || key,
              popularity: item.num,
              link: url.toString(),
            };
          });
      },
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool provides '实时热门中文资讯' (real-time trending Chinese information), which implies it's a read-only operation fetching current data. However, it doesn't disclose important behavioral traits like rate limits, authentication requirements, data freshness, pagination, or error handling. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 a single, well-structured Chinese sentence that efficiently communicates the tool's purpose and content scope. It's front-loaded with the core function ('获取微博热搜榜') and then elaborates on content types without redundancy. Every part of the sentence adds value, making it appropriately concise for a zero-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, no annotations, no output schema), the description is adequate but has clear gaps. It explains what the tool does and what content to expect, which is sufficient for basic understanding. However, without annotations or output schema, it should ideally provide more behavioral context (like data format, update frequency, or limitations) to be fully complete for agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (since there are no parameters to describe). The description appropriately doesn't discuss parameters, focusing instead on what the tool returns. With no parameters, the baseline score is 4, as there's nothing to compensate for and the description correctly avoids unnecessary parameter discussion.

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 clearly states the tool's purpose as '获取微博热搜榜' (get Weibo trending list), which is a specific verb+resource combination. It further elaborates on the content types included (current affairs, social phenomena, entertainment news, celebrity updates, and trending topics), which helps distinguish it from generic news tools. However, it doesn't explicitly differentiate from sibling tools like 'get-douyin-trending' or 'get-zhihu-trending' beyond the platform specificity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it specifies the content is '实时热门中文资讯' (real-time trending Chinese information), it doesn't mention when to choose Weibo over other Chinese platforms like Douyin or Zhihu, nor does it provide any exclusion criteria or prerequisites for usage.

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/baranwang/mcp-trends-hub'

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