Skip to main content
Glama
huangxinping

Huggingface Daily Papers

by huangxinping

get_yesterday_papers

Fetch yesterday's HuggingFace daily papers to stay updated on AI research developments.

Instructions

Get yesterday's HuggingFace daily papers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that calculates yesterday's date and fetches papers using the generic get_papers_by_date method.
    def get_yesterday_papers(self, fetch_details: bool = True) -> List[Dict]:
        yesterday = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d")
        return self.get_papers_by_date(yesterday, fetch_details)
  • main.py:163-191 (handler)
    MCP server @server.call_tool() handler implementation that calls the scraper, formats the response as text content.
    elif name == "get_yesterday_papers":
        papers = scraper.get_yesterday_papers()
        yesterday = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d")
        
        if not papers:
            return [
                types.TextContent(
                    type="text",
                    text=f"No papers found for yesterday ({yesterday}). There might be no papers published that day or a network issue."
                )
            ]
        
        return [
            types.TextContent(
                type="text",
                text=f"Yesterday's Papers ({yesterday}) - 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:83-90 (registration)
    Tool registration in @server.list_tools() defining the tool name, description, and input schema.
    types.Tool(
        name="get_yesterday_papers",
        description="Get yesterday's HuggingFace daily papers", 
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • main.py:86-89 (schema)
    Input schema for the get_yesterday_papers tool, specifying an empty object (no required parameters).
    inputSchema={
        "type": "object",
        "properties": {},
    },
  • Helper method delegated to by get_yesterday_papers for fetching and parsing papers from HuggingFace for a specific date, optionally fetching details.
    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 full burden but only states what the tool does without disclosing behavioral traits such as rate limits, authentication needs, or response format. It mentions no constraints or side effects, leaving gaps in understanding how the tool behaves.

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 that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to grasp immediately.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks details on behavioral aspects and sibling differentiation. It covers the basic purpose but doesn't provide enough context for optimal agent use without additional information.

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 with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter information, which is acceptable here as there are no parameters to explain, aligning with the baseline for zero parameters.

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 ('yesterday's HuggingFace daily papers'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_papers_by_date' or 'get_today_papers' beyond the temporal scope, missing explicit comparison.

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_today_papers'. It implies usage for yesterday's papers only but lacks explicit when/when-not instructions or prerequisites.

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