Skip to main content
Glama
baranwang

Trends Hub

get-netease-news-trending

Fetch trending news from NetEase covering politics, society, finance, technology, and entertainment in Chinese.

Instructions

获取网易新闻热点榜,包含时政要闻、社会事件、财经资讯、科技动态及娱乐体育的全方位中文新闻资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that fetches trending news from the Netease API endpoint 'https://m.163.com/fe/api/hot/news/flow', validates the response, and maps the list to objects containing title, cover image, source, publish time, and link.
    func: async () => {
      const resp = await http.get<{
        code: number;
        data: {
          list: any[];
        };
      }>('https://m.163.com/fe/api/hot/news/flow');
    
      if (resp.data.code !== 200 || !Array.isArray(resp.data.data.list)) {
        throw new Error('获取网易新闻热点榜失败');
      }
      return resp.data.data.list.map((item) => {
        return {
          title: item.title,
          cover: item.imgsrc,
          source: item.source,
          publish_time: item.ptime,
          link: item.url,
        };
      });
    },
  • The tool is registered via export default of defineToolConfig, which provides the name, description, and references the handler function. This config is dynamically loaded by src/index.ts using webpackContext.
    export default defineToolConfig({
      name: 'get-netease-news-trending',
      description: '获取网易新闻热点榜,包含时政要闻、社会事件、财经资讯、科技动态及娱乐体育的全方位中文新闻资讯',
      func: async () => {
        const resp = await http.get<{
          code: number;
          data: {
            list: any[];
          };
        }>('https://m.163.com/fe/api/hot/news/flow');
    
        if (resp.data.code !== 200 || !Array.isArray(resp.data.data.list)) {
          throw new Error('获取网易新闻热点榜失败');
        }
        return resp.data.data.list.map((item) => {
          return {
            title: item.title,
            cover: item.imgsrc,
            source: item.source,
            publish_time: item.ptime,
            link: item.url,
          };
        });
      },
    });

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