semantic_scholar
Related papers (similar, references, citations) from Semantic Scholar.
arXiv itself has no similarity or citation data, so arxiv_related_papers
asks the Semantic Scholar API, which indexes arXiv papers by their arXiv ID.
- exception arxiv_query_mcp.semantic_scholar.PaperNotIndexedError[source]
Bases:
ExceptionSemantic Scholar has no record of the requested arXiv paper.
Fetch papers related to an arXiv paper from Semantic Scholar.
- Parameters:
arxiv_id (str) – Version-less arXiv ID, e.g.
'1706.03762'.relation (Relation) – Which relation to fetch.
limit (int) – Maximum number of papers to return.
offset (int) – Pagination offset (references and citations only).
cfg (Config) – Server configuration (API URL, key, base URLs).
client (httpx.AsyncClient) – Shared async HTTP client.
cache (TwoTierCache | None) – Optional cache; results are cached like arXiv responses.
limiter (RateLimiter | None) – Optional Semantic Scholar rate limiter.
- Returns:
(next_offset, papers).next_offsetisNonewhen there are no further pages.- Raises:
PaperNotIndexedError – Semantic Scholar does not know the paper.
httpx.HTTPStatusError – Semantic Scholar returned another error.
- Return type:
Return a helpful message for a Semantic Scholar failure, if it is one.
Render related papers as Markdown.
- Parameters:
- Returns:
A Markdown list with one section per paper and a pagination hint.
- Return type: