Skip to main content
Glama
nanyang12138

AI Research MCP Server

by nanyang12138

get_daily_papers

Retrieve featured AI research papers from Hugging Face to stay updated on daily developments. Specify days to look back for comprehensive tracking.

Instructions

Get today's featured AI papers from Hugging Face

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to look back (1-7)

Implementation Reference

  • Handler function that executes the get_daily_papers tool logic: caches and formats papers fetched from HuggingFaceClient.get_daily_papers()
    async def _get_daily_papers(self, days: int = 1) -> str:
        """Get daily featured papers from Hugging Face."""
        cache_key = f"hf_daily_{days}"
        cached = self.cache.get(cache_key, 3600 * 12)  # 12 hour cache
        if cached:
            papers = cached
        else:
            papers = await asyncio.to_thread(
                self.huggingface.get_daily_papers,
                days=days,
            )
            self.cache.set(cache_key, papers)
        
        return self._format_papers(papers)
  • Registration of the get_daily_papers tool in list_tools(), including input schema definition
    Tool(
        name="get_daily_papers",
        description="Get today's featured AI papers from Hugging Face",
        inputSchema={
            "type": "object",
            "properties": {
                "days": {
                    "type": "integer",
                    "description": "Number of days to look back (1-7)",
                    "default": 1,
                },
            },
        },
    ),
  • Core helper function in HuggingFaceClient that fetches and processes daily papers from Hugging Face API endpoints.
    def get_daily_papers(self, days: int = 1) -> List[Dict]:
        """Get daily papers from Hugging Face.
        
        Args:
            days: Number of days to look back (1-7)
            
        Returns:
            List of paper dictionaries
        """
        papers = []
        
        for day_offset in range(days):
            date = datetime.now(timezone.utc) - timedelta(days=day_offset)
            date_str = date.strftime("%Y-%m-%d")
            
            try:
                url = f"{self.papers_base_url}?date={date_str}"
                response = requests.get(url, timeout=10)
                response.raise_for_status()
                
                daily_papers = response.json()
                
                for paper in daily_papers:
                    # Ensure published date has timezone info
                    published_date = paper.get("publishedAt", date_str)
                    if published_date and "T" not in published_date:
                        # If it's just a date, add time and timezone
                        published_date = f"{published_date}T00:00:00+00:00"
                    papers.append({
                        "title": paper.get("title", ""),
                        "authors": paper.get("authors", []),
                        "summary": paper.get("summary", ""),
                        "published": published_date,
                        "url": f"https://huggingface.co/papers/{paper.get('id', '')}",
                        "arxiv_id": paper.get("id", ""),
                        "upvotes": paper.get("upvotes", 0),
                        "num_comments": paper.get("numComments", 0),
                        "thumbnail": paper.get("thumbnail", ""),
                        "source": "huggingface",
                    })
            except requests.RequestException as e:
                print(f"Error fetching papers for {date_str}: {e}")
                continue
        
        # Sort by upvotes
        papers.sort(key=lambda x: x.get("upvotes", 0), reverse=True)
        return papers
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'featured' papers, implying a curated or filtered list, but doesn't explain criteria for 'featured', potential rate limits, authentication needs, or what happens if no papers are found. This leaves significant gaps in understanding the tool's behavior.

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 unnecessary words. It's front-loaded and appropriately sized for a simple tool, with no wasted information.

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 (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output format, which are needed for full completeness in the absence of annotations and output schema.

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 input schema has 100% description coverage, with the 'days' parameter fully documented in the schema. The description doesn't add any parameter semantics beyond what the schema provides, such as clarifying 'today's' versus the 'days' parameter or detailing output format. Baseline 3 is appropriate as the schema handles the parameter documentation.

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 featured AI papers from Hugging Face'), making the purpose understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_latest_papers' or 'search_by_area', which could also retrieve papers, so it doesn't achieve full sibling differentiation.

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. It doesn't mention sibling tools like 'search_latest_papers' for broader searches or 'generate_daily_summary' for summaries, nor does it specify contexts or exclusions for usage.

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/nanyang12138/AI-Research-MCP'

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