get-daily-papers
Retrieve curated daily research papers from Hugging Face to stay informed about academic developments and machine learning advancements.
Instructions
Get the list of daily papers curated by Hugging Face
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/huggingface/server.py:500-523 (handler)The handler logic for the 'get-daily-papers' tool. Fetches data from the 'daily_papers' endpoint using make_hf_request, handles errors, formats each paper's arXiv ID, title, authors, and truncated summary, then returns a JSON string of the results.elif name == "get-daily-papers": data = await make_hf_request("daily_papers") if "error" in data: return [ types.TextContent( type="text", text=f"Error retrieving daily papers: {data['error']}" ) ] # Format the results results = [] for paper in data: paper_info = { "arxiv_id": paper.get("paper", {}).get("arxivId", ""), "title": paper.get("paper", {}).get("title", ""), "authors": paper.get("paper", {}).get("authors", []), "summary": paper.get("paper", {}).get("summary", "")[:200] + "..." if len(paper.get("paper", {}).get("summary", "")) > 200 else paper.get("paper", {}).get("summary", ""), } results.append(paper_info) return [types.TextContent(type="text", text=json.dumps(results, indent=2))]
- src/huggingface/server.py:184-191 (registration)Registers the 'get-daily-papers' tool in the @server.list_tools() handler, including its description and input schema (empty properties, no required arguments).types.Tool( name="get-daily-papers", description="Get the list of daily papers curated by Hugging Face", inputSchema={ "type": "object", "properties": {}, }, ),
- src/huggingface/server.py:187-190 (schema)JSON schema for the 'get-daily-papers' tool input: an object with no properties (no parameters needed).inputSchema={ "type": "object", "properties": {}, },
- src/huggingface/server.py:36-47 (helper)Helper function used by the handler to make HTTP requests to the Hugging Face API, specifically called with 'daily_papers' endpoint.async def make_hf_request( endpoint: str, params: Optional[Dict[str, Any]] = None ) -> Dict: """Make a request to the Hugging Face API with proper error handling.""" url = f"{HF_API_BASE}/{endpoint}" try: response = await http_client.get(url, params=params) response.raise_for_status() return response.json() except Exception as e: return {"error": str(e)}