Skip to main content
Glama

get-thepaper-trending

Track trending news on The Paper, covering politics, finance, social issues, culture, and in-depth reports from China. Stay updated with current events and key developments.

Instructions

获取澎湃新闻热榜,包含时政要闻、财经动态、社会事件、文化教育及深度报道的高质量中文新闻资讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function fetches trending news from The Paper API, validates the response, processes the hotNews array, and returns formatted items with title, cover, popularity, publish time, hashtags, and link.
    func: async () => { const resp = await http.get<{ resultCode: number; resultMsg: string; data: { hotNews: any[]; }; }>('https://cache.thepaper.cn/contentapi/wwwIndex/rightSidebar'); if (resp.data.resultCode !== 1 || !Array.isArray(resp.data.data.hotNews)) { throw new Error(resp.data.resultMsg || '获取澎湃新闻热榜失败'); } return resp.data.data.hotNews.map((item) => { return { title: item.name, cover: item.pic, popularity: item.praiseTimes, publish_time: dayjs(item.pubTimeLong).toISOString(), hashtags: item.tagList?.map((tag: any) => `#${tag.tag}`).join(' '), link: `https://www.thepaper.cn/newsDetail_forward_${item.contId}`, }; }); },
  • The tool is registered using defineToolConfig with the name 'get-thepaper-trending', a description in Chinese, and references the handler function.
    export default defineToolConfig({ name: 'get-thepaper-trending', description: '获取澎湃新闻热榜,包含时政要闻、财经动态、社会事件、文化教育及深度报道的高质量中文新闻资讯', func: async () => { const resp = await http.get<{ resultCode: number; resultMsg: string; data: { hotNews: any[]; }; }>('https://cache.thepaper.cn/contentapi/wwwIndex/rightSidebar'); if (resp.data.resultCode !== 1 || !Array.isArray(resp.data.data.hotNews)) { throw new Error(resp.data.resultMsg || '获取澎湃新闻热榜失败'); } return resp.data.data.hotNews.map((item) => { return { title: item.name, cover: item.pic, popularity: item.praiseTimes, publish_time: dayjs(item.pubTimeLong).toISOString(), hashtags: item.tagList?.map((tag: any) => `#${tag.tag}`).join(' '), link: `https://www.thepaper.cn/newsDetail_forward_${item.contId}`, }; }); }, });

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