Skip to main content
Glama
huangxinping

Huggingface Daily Papers

by huangxinping

get_today_papers

Retrieve today's machine learning research papers from HuggingFace to stay current with academic developments.

Instructions

Get today's HuggingFace daily papers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:133-161 (handler)
    MCP server.call_tool handler implementation for 'get_today_papers': fetches papers from scraper, handles empty case, formats detailed markdown list of papers with title, authors, abstract, URL, PDF, votes, and submitter.
    elif name == "get_today_papers":
        papers = scraper.get_today_papers()
        today = datetime.now().strftime("%Y-%m-%d")
        
        if not papers:
            return [
                types.TextContent(
                    type="text",
                    text=f"No papers found for today ({today}). Papers might not be published yet or there could be a network issue."
                )
            ]
        
        return [
            types.TextContent(
                type="text", 
                text=f"Today's Papers ({today}) - Found {len(papers)} papers:\n\n" +
                     "\n".join([
                         f"Title: {paper['title']}\n"
                         f"Authors: {', '.join(paper['authors'])}\n"
                         f"Abstract: {paper['abstract']}\n" 
                         f"URL: {paper['url']}\n"
                         f"PDF: {paper['pdf_url']}\n"
                         f"Votes: {paper['votes']}\n"
                         f"Submitted by: {paper['submitted_by']}\n"
                         + "-" * 50
                         for paper in papers
                     ])
            )
        ]
  • main.py:75-82 (registration)
    Registration of the 'get_today_papers' tool in server.list_tools(), including name, description, and input schema (no required properties).
    types.Tool(
        name="get_today_papers", 
        description="Get today's HuggingFace daily papers",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • main.py:78-81 (schema)
    Input schema for 'get_today_papers' tool: empty object with no properties.
    inputSchema={
        "type": "object",
        "properties": {},
    },
  • Core scraper method get_today_papers(): computes today's date and delegates to get_papers_by_date (the actual scraping logic). Called by MCP tool handler.
    def get_today_papers(self, fetch_details: bool = True) -> List[Dict]:
        today = datetime.now().strftime("%Y-%m-%d")
        return self.get_papers_by_date(today, fetch_details)
  • Supporting scraper method get_papers_by_date(): fetches HTML from HF papers page, parses papers, optionally fetches details (abstract, PDF, authors from arXiv), used by get_today_papers.
    def get_papers_by_date(self, date: str, fetch_details: bool = True) -> List[Dict]:
        url = f"{self.base_url}/{date}"
        try:
            response = self.session.get(url)
            response.raise_for_status()
            papers = self._parse_papers(response.text)
            
            if fetch_details and papers:
                # 获取所有论文的详细信息,包括具体作者姓名
                for i, paper in enumerate(papers):
                    if paper.get('url'):
                        details = self._fetch_paper_details(paper['url'])
                        if details:
                            paper.update(details)
                        time.sleep(1)  # 避免请求过快
                        
            return papers
        except requests.RequestException as e:
            logging.error(f"Failed to fetch papers for {date}: {e}")
            return []
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool fetches papers but doesn't describe traits such as rate limits, authentication needs, data format, or potential errors. This is a significant gap for a tool with zero annotation coverage, making it minimally adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, clearly front-loading the core purpose. It is appropriately sized for a simple tool with no parameters, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is complete enough to convey the basic action. However, it lacks details on output format, error handling, or sibling tool differentiation, which are gaps in context for a tool that fetches data, making it minimally viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the input schema coverage is 100% with an empty object. The description doesn't need to add parameter semantics, so it meets the baseline for tools with no parameters, though it doesn't explicitly state the lack of parameters, which slightly limits clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('today's HuggingFace daily papers'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_papers_by_date' or 'get_yesterday_papers' beyond the temporal scope implied by 'today's', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_papers_by_date' or 'get_yesterday_papers'. It implies usage for today's papers but lacks explicit context, exclusions, or prerequisites, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/huangxinping/huggingface-daily-paper-mcp'

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