Skip to main content
Glama
adityak74

MCP Scholarly Server

by adityak74

search-google-scholar

Retrieve academic articles from Google Scholar by entering specific keywords, facilitating research and access to scholarly resources.

Instructions

Search google scholar for articles related to the given keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes

Implementation Reference

  • Executes the core logic of the 'search-google-scholar' tool by searching Google Scholar via the scholarly library and formatting results.
    def search_pubs(self, keyword) -> List[str]: search_results = self.scholarly.search_pubs(keyword) articles = self._parse_results(search_results) return articles
  • Helper method to parse and format up to 10 search results from scholarly into strings.
    @staticmethod def _parse_results(search_results): articles = [] results_iter = 0 for searched_article in search_results: bib = searched_article.get('bib', {}) title = bib.get('title', 'No title') abstract = bib.get('abstract', 'No abstract available') pub_url = searched_article.get('pub_url', 'No URL available') article_string = f"Title: {title}\nAbstract: {abstract}\nURL: {pub_url}" articles.append(article_string) results_iter += 1 if results_iter >= MAX_RESULTS: break return articles
  • JSON schema definition for the tool's input: requires a 'keyword' string.
    types.Tool( name="search-google-scholar", description="Search google scholar for articles related to the given keyword.", inputSchema={ "type": "object", "properties": { "keyword": {"type": "string"}, }, "required": ["keyword"], }, )
  • Dispatch branch in handle_call_tool that instantiates GoogleScholar and invokes the tool handler.
    elif name == "search-google-scholar": google_scholar = GoogleScholar() formatted_results = google_scholar.search_pubs(keyword=keyword)
  • Tool registration in list_tools handler, defining both arxiv and google scholar tools.
    return [ types.Tool( name="search-arxiv", description="Search arxiv for articles related to the given keyword.", inputSchema={ "type": "object", "properties": { "keyword": {"type": "string"}, }, "required": ["keyword"], }, ), types.Tool( name="search-google-scholar", description="Search google scholar for articles related to the given keyword.", inputSchema={ "type": "object", "properties": { "keyword": {"type": "string"}, }, "required": ["keyword"], }, ) ]

Other Tools

Related 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/adityak74/mcp-scholarly'

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