get_scholar_data
Retrieve BibTeX-formatted citations from Google Scholar by querying publications. Simplify citation management and integrate directly into applications for enhanced research workflows.
Instructions
Retrieve results BibTeX-formatted citations for publications matching the query from the Google Scholar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| results | No |
Implementation Reference
- src/reference_mcp/server.py:19-23 (handler)The handler function for the 'get_scholar_data' tool. It is registered via the @mcp.tool() decorator and implements the logic to search Google Scholar publications using the 'scholarly' library and return BibTeX formatted citations.@mcp.tool() def get_scholar_data(query: str, results: int = 2) -> str: """Retrieve `results` BibTeX-formatted citations for publications matching the `query` from the Google Scholar""" pubs = scholarly.search_pubs(query) return "\n".join(scholarly.bibtex(pub) for pub in itertools.islice(pubs, results))