get_crossref_paper_by_doi
Retrieve academic paper metadata including title, authors, and citation count using a DOI identifier from the CrossRef database.
Instructions
Get paper metadata from CrossRef using its DOI.
USE THIS TOOL WHEN:
- You have a DOI and need full metadata (title, authors, journal, etc.)
- You want to verify a DOI exists
- You need citation count for a specific paper
Args:
doi: Digital Object Identifier (e.g., '10.1038/nature12373').
Returns:
Paper metadata dict, or empty dict {} if DOI not found.
Example:
get_crossref_paper_by_doi("10.1038/nature12373")
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doi | Yes |
Implementation Reference
- paper_find_mcp/server.py:659-684 (handler)MCP tool handler and registration. Retrieves CrossRef paper by DOI using the CrossRefSearcher instance, converts Paper to dict.@mcp.tool() async def get_crossref_paper_by_doi(doi: str) -> Dict: """Get paper metadata from CrossRef using its DOI. USE THIS TOOL WHEN: - You have a DOI and need full metadata (title, authors, journal, etc.) - You want to verify a DOI exists - You need citation count for a specific paper Args: doi: Digital Object Identifier (e.g., '10.1038/nature12373'). Returns: Paper metadata dict, or empty dict {} if DOI not found. Example: get_crossref_paper_by_doi("10.1038/nature12373") """ searcher = SEARCHERS['crossref'] try: paper = searcher.get_paper_by_doi(doi) return paper.to_dict() if paper else {} except Exception as e: logger.error(f"CrossRef DOI lookup failed: {e}") return {}
- Core implementation in CrossRefSearcher: queries CrossRef API /works/{doi}, parses response into Paper object using _parse_crossref_item.def get_paper_by_doi(self, doi: str) -> Optional[Paper]: """ Get a specific paper by DOI. Args: doi: Digital Object Identifier Returns: Paper object if found, None otherwise """ try: url = f"{self.BASE_URL}/works/{doi}" params = {'mailto': 'paper-search@example.org'} response = self.session.get(url, params=params, timeout=30) if response.status_code == 404: logger.warning(f"DOI not found in CrossRef: {doi}") return None response.raise_for_status() data = response.json() item = data.get('message', {}) return self._parse_crossref_item(item) except requests.RequestException as e: logger.error(f"Error fetching DOI {doi} from CrossRef: {e}") return None except Exception as e: logger.error(f"Unexpected error fetching DOI {doi}: {e}") return None
- paper_find_mcp/server.py:75-85 (helper)Global SEARCHERS dictionary instantiates and registers the CrossRefSearcher singleton used by the get_crossref_paper_by_doi tool.SEARCHERS = { 'arxiv': ArxivSearcher(), 'pubmed': PubMedSearcher(), 'biorxiv': BioRxivSearcher(), 'medrxiv': MedRxivSearcher(), 'google_scholar': GoogleScholarSearcher(), 'iacr': IACRSearcher(), 'semantic': SemanticSearcher(), 'crossref': CrossRefSearcher(), 'repec': RePECSearcher(), }