Skip to main content
Glama
huangxinping

Huggingface Daily Papers

by huangxinping

get_papers_by_date

Retrieve HuggingFace research papers published on a specific date by providing a YYYY-MM-DD formatted date parameter.

Instructions

Get HuggingFace daily papers for a specific date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesDate in YYYY-MM-DD format

Implementation Reference

  • Core implementation of the get_papers_by_date tool. Fetches papers from HuggingFace for the given date, parses the HTML, and optionally fetches additional details like abstracts and authors from individual paper pages and ArXiv.
    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 []
  • main.py:60-74 (registration)
    MCP tool registration defining the tool name, description, and input schema (date parameter with YYYY-MM-DD pattern).
    types.Tool(
        name="get_papers_by_date",
        description="Get HuggingFace daily papers for a specific date",
        inputSchema={
            "type": "object",
            "properties": {
                "date": {
                    "type": "string",
                    "description": "Date in YYYY-MM-DD format",
                    "pattern": r"^\d{4}-\d{2}-\d{2}$"
                }
            },
            "required": ["date"]
        },
    ),
  • main.py:63-73 (schema)
    Input schema definition for the get_papers_by_date tool, specifying the required 'date' parameter.
    inputSchema={
        "type": "object",
        "properties": {
            "date": {
                "type": "string",
                "description": "Date in YYYY-MM-DD format",
                "pattern": r"^\d{4}-\d{2}-\d{2}$"
            }
        },
        "required": ["date"]
    },
  • main.py:100-132 (handler)
    MCP server @server.call_tool() dispatch logic for get_papers_by_date: validates input, calls scraper.get_papers_by_date, handles empty results, and formats the output as formatted text content.
    if name == "get_papers_by_date":
        if not arguments or "date" not in arguments:
            raise ValueError("Date is required")
        
        date = arguments["date"]
        papers = scraper.get_papers_by_date(date)
        
        if not papers:
            return [
                types.TextContent(
                    type="text",
                    text=f"No papers found for {date}. Please check if the date is correct and has published papers."
                )
            ]
        
        return [
            types.TextContent(
                type="text",
                text=f"Found {len(papers)} papers for {date}:\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
                     ])
            )
        ]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool's function but doesn't describe what 'Get' entails (e.g., returns a list, format of papers, pagination, rate limits, or authentication needs). This leaves significant gaps for a tool with no annotation coverage.

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 zero waste. It's appropriately sized for a simple tool with one parameter and is front-loaded with the core purpose.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list of papers, metadata format) or behavioral aspects like error handling. For a tool with 1 parameter but missing structured output info, this is inadequate.

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

Parameters3/5

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

The schema description coverage is 100%, with the parameter 'date' fully documented in the schema (type, format, pattern). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage.

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 ('HuggingFace daily papers') with specific scope ('for a specific date'). It distinguishes from sibling tools by specifying date-based retrieval rather than relative timeframes like 'today' or 'yesterday', though it doesn't explicitly name the siblings.

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

Usage Guidelines3/5

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

The description implies usage for date-specific paper retrieval, but doesn't explicitly state when to use this tool versus the sibling tools (get_today_papers, get_yesterday_papers). It provides context about the date parameter but lacks explicit alternatives or exclusions.

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