Skip to main content
Glama

get-infoq-news

Fetch enterprise-level technical insights and developer updates from InfoQ, including software development, architecture design, cloud computing, and AI trends.

Instructions

获取 InfoQ 技术资讯,包含软件开发、架构设计、云计算、AI等企业级技术内容和前沿开发者动态

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNocn

Implementation Reference

  • Handler function for get-infoq-news tool: validates input using schema, fetches RSS items with getRssItems, omits description for 'cn' region, and returns the items.
    func: async (args) => { const { url, region } = infoqRequestSchema.parse(args); const resp = await getRssItems(url); // 中文版 description 没有实质内容 if (region === 'cn') { return resp.map((item) => omit(item, ['description'])); } return resp; },
  • Zod input schema for the tool: defines optional 'region' parameter ('cn' or 'global' with default 'cn'), transforms to include the corresponding RSS URL.
    const infoqRequestSchema = z .object({ region: z.enum(['cn', 'global']).optional().default('cn'), }) .transform((data) => { const url = { cn: 'https://www.infoq.cn/feed', global: 'https://feed.infoq.com/', }[data.region]; return { ...data, url, }; });
  • Tool registration via defineToolConfig: specifies name 'get-infoq-news', description, input schema, and inline handler function.
    export default defineToolConfig({ name: 'get-infoq-news', description: '获取 InfoQ 技术资讯,包含软件开发、架构设计、云计算、AI等企业级技术内容和前沿开发者动态', zodSchema: infoqRequestSchema, func: async (args) => { const { url, region } = infoqRequestSchema.parse(args); const resp = await getRssItems(url); // 中文版 description 没有实质内容 if (region === 'cn') { return resp.map((item) => omit(item, ['description'])); } return resp; }, });
  • Core helper function used by the tool to fetch RSS feed from URL, parse XML items, and structure them into title, description, category, author, publish_time, and link.
    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, }; }); };

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