Skip to main content
Glama
h-lu
by h-lu

read_repec_paper

Provides alternative methods to access RePEc/IDEAS papers when direct reading is unavailable, including checking paper URLs or using other tools for older publications.

Instructions

RePEc/IDEAS does NOT support direct paper reading.

INSTEAD (try in order): 1. Visit paper URL - many NBER/Fed papers are freely available 2. read_scihub_paper(doi) - if published before 2023 Args: paper_id: RePEc handle (unused). save_path: Unused. Returns: Error message with alternatives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo

Implementation Reference

  • Handler function for 'read_repec_paper' tool. Registered via @mcp.tool() decorator. Delegates to generic _read function using RePECSearcher.read_paper.
    @mcp.tool() async def read_repec_paper(paper_id: str, save_path: Optional[str] = None) -> str: """RePEc/IDEAS does NOT support direct paper reading. INSTEAD (try in order): 1. Visit paper URL - many NBER/Fed papers are freely available 2. read_scihub_paper(doi) - if published before 2023 Args: paper_id: RePEc handle (unused). save_path: Unused. Returns: Error message with alternatives. """ return await _read('repec', paper_id, save_path)
  • The core implementation logic for reading RePEc papers in RePECSearcher.read_paper method, which provides an error response since direct reading is not supported.
    def read_paper(self, paper_id: str, save_path: str) -> str: """RePEc/IDEAS 不支持直接论文阅读 Args: paper_id: RePEc handle (未使用) save_path: 保存路径 (未使用) Returns: str: 错误信息和替代方案 """ return ( "RePEc/IDEAS papers cannot be read directly. " "Only metadata and abstracts are available through IDEAS. " "ALTERNATIVES:\n" "1. Visit the paper URL to access full text at the source\n" "2. If DOI is available, use read_scihub_paper(doi)\n" "3. Many working papers from NBER/Fed are freely downloadable" )
  • Generic _read helper function used by read_repec_paper and other platform-specific read tools to invoke the platform searcher's read_paper method.
    async def _read( searcher_name: str, paper_id: str, save_path: Optional[str] = None ) -> str: """通用阅读函数""" if save_path is None: save_path = get_download_path() searcher = SEARCHERS.get(searcher_name) if not searcher: return f"Error: Unknown searcher {searcher_name}" try: return searcher.read_paper(paper_id, save_path) except NotImplementedError as e: return str(e) except Exception as e: logger.error(f"Read failed for {searcher_name}: {e}") return f"Error reading paper: {str(e)}"
  • Global SEARCHERS dictionary registration where 'repec': RePECSearcher() instance is created for use by the _read function.
    SEARCHERS = { 'arxiv': ArxivSearcher(), 'pubmed': PubMedSearcher(), 'biorxiv': BioRxivSearcher(), 'medrxiv': MedRxivSearcher(), 'google_scholar': GoogleScholarSearcher(), 'iacr': IACRSearcher(), 'semantic': SemanticSearcher(), 'crossref': CrossRefSearcher(), 'repec': RePECSearcher(), }

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/h-lu/paper-search-mcp'

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