Skip to main content
Glama
baranwang

Trends Hub

get-gcores-new

Retrieve gaming news and in-depth content from Gcores, including game reviews, player culture, development insights, and related products.

Instructions

获取机核网游戏相关资讯,包含电子游戏评测、玩家文化、游戏开发和游戏周边产品的深度内容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function getRssItems that fetches RSS feed, parses XML, and extracts items with title, description, category, author, publish_time, and link. This is called by the tool's func.
    export const getRssItems = async (url: string) => {
      const data = await getRss(url);
      if (!Array.isArray(data.rss?.channel?.item)) {
        return [];
      }
      return (data.rss.channel.item as any[]).map((item) => {
        let category = '';
        if (typeof item.category === 'string') {
          category = item.category;
        }
        if (Array.isArray(item.category)) {
          category = item.category.join(', ');
        }
        return {
          title: item.title,
          description: item.description,
          category,
          author: item.author || item['dc:creator'],
          publish_time: item.pubDate,
          link: item.link,
        };
      });
    };
  • Tool registration defining name, description, and func that invokes getRssItems with Gcores RSS URL.
    export default defineToolConfig({
      name: 'get-gcores-new',
      description: '获取机核网游戏相关资讯,包含电子游戏评测、玩家文化、游戏开发和游戏周边产品的深度内容',
      func: () => getRssItems('https://www.gcores.com/rss'),
    });
  • Helper function getRss that fetches RSS XML and parses it using fast-xml-parser, used by getRssItems.
    export const getRss = async (url: string) => {
      const resp = await http.get(url);
      const parser = new XMLParser();
      return parser.parse(resp.data);
    };

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