Skip to main content
Glama
biocontext-ai

BioContextAI Knowledgebase MCP

Official

bc_search_google_scholar_publications

Search Google Scholar for publications by keyword or author. Get publication details including title, authors, venue, year, citations, abstract, and BibTeX entry.

Instructions

Search Google Scholar for publications with support for author search using 'author:"Name"' syntax. WARNING: Use responsibly, may block excessive queries.

Returns: dict: Publications list with title, authors, venue, year, citations, abstract, bib entry or error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., 'machine learning' or 'author:"John Smith" deep learning')
max_resultsNoMaximum number of publications to return (1-50)
use_proxyNoUse free proxies to avoid rate limiting

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual tool handler function 'search_google_scholar_publications' decorated with @core_mcp.tool(). Searches Google Scholar for publications using the scholarly library, supports proxy configuration, author search syntax, and returns publication metadata (title, author, venue, year, citations, abstract, URLs).
    @core_mcp.tool()
    def search_google_scholar_publications(
        query: Annotated[
            str,
            Field(description="Search query (e.g., 'machine learning' or 'author:\"John Smith\" deep learning')"),
        ],
        max_results: Annotated[int, Field(description="Maximum number of publications to return (1-50)", ge=1, le=50)] = 10,
        use_proxy: Annotated[bool, Field(description="Use free proxies to avoid rate limiting")] = True,
    ) -> Dict[str, Any]:
        """Search Google Scholar for publications with support for author search using 'author:"Name"' syntax. WARNING: Use responsibly, may block excessive queries.
    
        Returns:
            dict: Publications list with title, authors, venue, year, citations, abstract, bib entry or error message.
        """
        try:
            # Set up proxy if requested
            if use_proxy:
                try:
                    pg = ProxyGenerator()
                    pg.FreeProxies()
                    scholarly.use_proxy(pg)
                    logger.info("Proxy configured for Google Scholar requests")
                except Exception as e:
                    logger.warning(f"Failed to set up proxy: {e}")
                    # Continue without proxy
    
            # Search for publications
            search_query = scholarly.search_pubs(query)
    
            publications = []
    
            for count, pub in enumerate(search_query):
                if count >= max_results:
                    break
    
                # Extract publication information
                bib = pub.get("bib", {})
                pub_info = {
                    "title": bib.get("title", ""),
                    "author": bib.get("author", ""),
                    "venue": bib.get("venue", ""),
                    "pub_year": bib.get("pub_year", ""),
                    "abstract": bib.get("abstract", ""),
                    "pub_url": bib.get("pub_url", ""),
                    "eprint_url": pub.get("eprint_url", ""),
                    "num_citations": pub.get("num_citations", 0),
                    "citedby_url": pub.get("citedby_url", ""),
                    "url_scholarbib": pub.get("url_scholarbib", ""),
                }
    
                publications.append(pub_info)
    
            return {"query": query, "total_found": len(publications), "publications": publications}
    
        except Exception as e:
            logger.error(f"Error searching Google Scholar publications: {e}")
            return {
                "error": f"Failed to search Google Scholar publications: {e!s}",
                "note": "Google Scholar may be blocking requests. Publication searches are particularly risky. Try again later or use alternative databases like PubMed/EuropePMC.",
            }
  • Input schema for the tool: query (str, required), max_results (int, 1-50, default 10), use_proxy (bool, default True) — all defined using Pydantic Field annotations.
    def search_google_scholar_publications(
        query: Annotated[
            str,
            Field(description="Search query (e.g., 'machine learning' or 'author:\"John Smith\" deep learning')"),
        ],
        max_results: Annotated[int, Field(description="Maximum number of publications to return (1-50)", ge=1, le=50)] = 10,
        use_proxy: Annotated[bool, Field(description="Use free proxies to avoid rate limiting")] = True,
  • Tool registration via @core_mcp.tool() decorator on the function. The 'core_mcp' FastMCP server instance is imported from biocontext_kb/core/_server.py.
    @core_mcp.tool()
  • The FastMCP server instance 'core_mcp' that registers the tool via the @core_mcp.tool() decorator.
    core_mcp = FastMCP(  # type: ignore
        "BC",
        instructions="Provides access to biomedical knowledge bases.",
    )
  • Re-exports search_google_scholar_publications from the _search_publications module, making it part of the scholarly package's public API.
    from ._search_publications import search_google_scholar_publications
    
    __all__ = [
        "search_google_scholar_publications",
    ]
Behavior2/5

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

With no annotations, the description carries the full burden. It discloses return format and rate-limiting risk, but does not state whether the operation is read-only, authentication requirements, or other behavioral aspects.

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 sentence plus a warning and return type line, front-loaded with purpose, and contains no unnecessary words.

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

Completeness4/5

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

Given 3 parameters all documented and a return field list, the description is fairly complete. However, it lacks details on pagination or error handling, but is sufficient for most use cases.

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?

Input schema has 100% coverage with parameter descriptions. The description adds context about author syntax and warning, but adds little meaning beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states 'Search Google Scholar for publications' and highlights the specific author search syntax, making the tool's purpose distinct from sibling tools that focus on drugs and biomedical data.

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 includes a warning about responsible use and rate limiting, but does not provide explicit guidance on when to use this tool versus other alternatives or when not to use it.

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/biocontext-ai/knowledgebase-mcp'

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