Skip to main content
Glama

ArXiv Paper MCP

by yzfly

get_recent_ai_papers

Fetch the most recent arXiv papers in artificial intelligence (cs.AI/recent) to stay updated with cutting-edge research and developments in the AI field.

Instructions

获取 arXiv AI 领域最新论文(cs.AI/recent)

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • The core handler function that fetches the HTML content of recent AI papers (cs.AI/recent) from arXiv using axios.
    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)
    Registers the 'get_recent_ai_papers' tool in the listTools response, including its name, description, and empty input schema (no parameters required).
    { name: "get_recent_ai_papers", description: "获取 arXiv AI 领域最新论文(cs.AI/recent)", inputSchema: { type: "object", properties: {}, required: [] } },
  • Defines the input schema for the tool, which takes no parameters.
    inputSchema: { type: "object", properties: {}, required: [] }
  • The tool dispatcher case in the CallToolRequestSchema handler that invokes getRecentAIPapers() and formats the response as MCP content.
    case "get_recent_ai_papers": { const htmlContent = await getRecentAIPapers(); return { content: [{ type: "text", text: htmlContent }] }; }

Other Tools

Related Tools

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/yzfly/Arxiv-Paper-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server