get_recent_ai_papers
Retrieve recent AI research papers from arXiv's cs.AI category to access current scientific literature for academic or professional use.
Instructions
获取 arXiv AI 领域最新论文(cs.AI/recent)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:142-161 (handler)The core handler function that fetches and returns the HTML content of recent AI papers from the arXiv cs.AI/recent page.async function getRecentAIPapers(): Promise<string> { try { const url = 'https://arxiv.org/list/cs.AI/recent'; console.log(`正在获取 AI 领域最新论文: ${url}`); const response = await axios({ method: 'GET', url: url, timeout: 30000, headers: { 'User-Agent': 'Mozilla/5.0 (compatible; ArXiv-Paper-MCP/1.0)' } }); return response.data; } catch (error) { console.error("获取最新 AI 论文时出错:", error); throw new Error(`获取最新论文失败: ${error instanceof Error ? error.message : String(error)}`); } }
- src/index.ts:343-351 (registration)Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and empty input schema.{ name: "get_recent_ai_papers", description: "获取 arXiv AI 领域最新论文(cs.AI/recent)", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:414-423 (handler)Dispatcher case in the CallToolRequestSchema handler that calls the getRecentAIPapers function and formats the response.case "get_recent_ai_papers": { const htmlContent = await getRecentAIPapers(); return { content: [{ type: "text", text: htmlContent }] }; }
- src/index.ts:346-350 (schema)Input schema definition for the get_recent_ai_papers tool (no required parameters).inputSchema: { type: "object", properties: {}, required: [] }