get-infoq-news
Access InfoQ technology news covering enterprise-level content like software development, architecture design, cloud computing, and AI trends for developers.
Instructions
获取 InfoQ 技术资讯,包含软件开发、架构设计、云计算、AI等企业级技术内容和前沿开发者动态
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | cn |
Implementation Reference
- src/tools/infoq.ts:23-31 (handler)The main tool handler function that parses arguments with the schema, fetches RSS items from the specified InfoQ URL using getRssItems, and conditionally omits the description field for the Chinese region.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; },
- src/tools/infoq.ts:4-17 (schema)Zod schema defining the input parameters (region: 'cn' or 'global', default 'cn') and transforming it to include the corresponding RSS feed 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, }; });
- src/tools/infoq.ts:19-32 (registration)Registers the 'get-infoq-news' tool using defineToolConfig, specifying name, description, input schema, and 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; }, });