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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "get_scholar_data"
}
}Input 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))