Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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))]
  • 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": {}, }, ),
  • JSON schema for the 'get-daily-papers' tool input: an object with no properties (no parameters needed).
    inputSchema={ "type": "object", "properties": {}, },
  • 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)}

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/shreyaskarnik/huggingface-mcp-server'

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