Skip to main content
Glama
nanyang12138

AI Research MCP Server

by nanyang12138

search_github_repos

Find trending AI/ML repositories on GitHub by filtering with keywords, topics, stars, and recency to discover relevant research projects.

Instructions

Search for trending AI/ML GitHub repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordsNoKeywords to search for
topicsNoGitHub topics to filter by (e.g., ['llm', 'transformer'])
min_starsNoMinimum number of stars
daysNoLook for repos updated in last N days
max_resultsNoMaximum number of results

Implementation Reference

  • Core handler function that implements the search_github_repos tool logic: caches results from GithubClient.search_repositories and formats them.
    async def _search_github_repos(
        self,
        keywords: Optional[List[str]] = None,
        topics: Optional[List[str]] = None,
        min_stars: int = 50,
        days: int = 30,
        max_results: int = 25,
    ) -> str:
        """Search GitHub repositories."""
        cache_key = f"github_{keywords}_{topics}_{min_stars}_{days}"
        cached = self.cache.get(cache_key, self.cache_expiry["github"])
        if cached:
            repos = cached
        else:
            repos = await asyncio.to_thread(
                self.github.search_repositories,
                keywords=keywords,
                topics=topics,
                min_stars=min_stars,
                pushed_since=f"{days}d",
                max_results=max_results,
            )
            self.cache.set(cache_key, repos)
        
        return self._format_repos(repos)
  • Tool registration in list_tools(), including name, description, and input schema definition.
    Tool(
        name="search_github_repos",
        description="Search for trending AI/ML GitHub repositories",
        inputSchema={
            "type": "object",
            "properties": {
                "keywords": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "Keywords to search for",
                },
                "topics": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "GitHub topics to filter by (e.g., ['llm', 'transformer'])",
                },
                "min_stars": {
                    "type": "integer",
                    "description": "Minimum number of stars",
                    "default": 50,
                },
                "days": {
                    "type": "integer",
                    "description": "Look for repos updated in last N days",
                    "default": 30,
                },
                "max_results": {
                    "type": "integer",
                    "description": "Maximum number of results",
                    "default": 25,
                },
            },
        },
    ),
  • Helper function used by the handler to format the list of repositories as markdown.
    def _format_repos(self, repos: List[Dict]) -> str:
        """Format repositories as markdown."""
        if not repos:
            return "*No repositories found.*"
        
        lines = []
        for i, repo in enumerate(repos, 1):
            name = repo.get("full_name", "Unknown")
            description = repo.get("description", "No description")
            url = repo.get("url", "")
            stars = repo.get("stars", 0)
            language = repo.get("language", "")
            topics = repo.get("topics", [])
            
            lines.append(f"### {i}. [{name}]({url})")
            lines.append(f"⭐ {stars:,} • {language}")
            lines.append(f"\n{description}")
            
            if topics:
                topic_tags = " ".join(f"`{t}`" for t in topics[:5])
                lines.append(f"\n{topic_tags}")
            
            lines.append("")
        
        return "\n".join(lines)
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 mentions 'trending' but doesn't clarify behavioral traits like how results are sorted, rate limits, authentication needs, or what data is returned. This leaves significant gaps in understanding the tool's operation and constraints.

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

Conciseness4/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. It's appropriately sized and front-loaded, with no wasted words, though it could be slightly more informative without losing conciseness.

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 the tool's complexity (5 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral traits, output format, and usage context, making it inadequate for an agent to fully understand how to invoke and interpret results from this search tool.

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, clearly documenting all 5 parameters. The description adds no additional meaning beyond the schema, such as explaining parameter interactions or search logic. Baseline score of 3 is appropriate as the schema adequately covers parameter semantics without extra value from the description.

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

Purpose3/5

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

The description states the tool searches for trending AI/ML GitHub repositories, which provides a general purpose. However, it's vague about what 'trending' means (e.g., based on stars, recency, or other metrics) and doesn't clearly distinguish it from sibling tools like 'get_trending_repos' or 'search_by_area', leaving ambiguity in scope and 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?

No explicit guidance is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools, prerequisites, or specific contexts for application, such as comparing to 'get_trending_repos' for broader trending or 'search_by_area' for non-AI/ML searches, leaving the agent without clear usage direction.

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