An opencode plugin that adds a research_papers tool. This is an AI-facing tool, not a slash command — ask the AI to search for papers and it will call the tool for you.
Install. Restart. Ask for papers. It works.
- No API keys required. Uses arXiv for fresh preprints and OpenAlex for broader scholarly metadata, citation counts, and open-access links.
- Smart
autosource routing — arXiv forlatest, OpenAlex fortop_citedandtrending, both merged when available. - Markdown output with title, authors, date, PDF link, abstract, and citation count where available.
- Filter by recency (
latest,trending) or citation impact (top_cited). - Narrow results to the past week, month, or year.
strictmode applies anchor + concept-group filtering to reduce loosely matched results.- Source-level fallback: if one source fails or is rate-limited, the other handles the request transparently.
- arXiv requests are spaced 3 seconds apart per arXiv's public API terms.
Add this to your opencode.json:
{
"plugin": [
"opencode-research-papers"
]
}Restart opencode. The tool registers automatically.
OpenCode caches plugin packages and does not auto-update on restart. After updating to a new version, clear the cache before restarting:
Windows (PowerShell):
Remove-Item -Recurse -Force "$env:USERPROFILE\.cache\opencode\packages\opencode-research-papers@latest"macOS / Linux:
rm -rf ~/.cache/opencode/packages/opencode-research-papers@latestThen restart opencode.
This is an AI tool — you do not invoke it with a slash command. Ask naturally:
"Find the latest papers on Image Segmentation"
"Show me trending Scene Text Recognition papers"
"Get top-cited Retinal Vessel Segmentation papers"
"Find 20 latest papers on Generative Adversarial Networks from the last month"
Pass options as a tuple:
["opencode-research-papers", {
"defaultMaxResults": 15,
"defaultSource": "auto"
}]| Option | Default | Description |
|---|---|---|
defaultMaxResults |
10 |
How many results to return (1–50) |
defaultSource |
"auto" |
Source routing: auto, arxiv, or openalex |
The auto default selects the primary source per filter:
| Filter | Primary | Fallback |
|---|---|---|
latest |
arXiv | OpenAlex |
top_cited |
OpenAlex | arXiv |
trending |
OpenAlex | arXiv |
Override with source: "arxiv" or source: "openalex" to use a single source.
Provides fresh preprints across AI, CS, math, and physics. Delivers direct PDF links and clean metadata. No signup required. Requests are rate-limited to one per 3 seconds per arXiv's public API terms.
Broader scholarly search with citation counts, DOI metadata, and open-access links. Works without an API key at 10 requests per second.
If one source is down or rate-limited, the plugin returns the other source's results with the specific error noted. If both fail, you receive a consolidated error message. The tool does not crash.
MIT
Potential future additions:
- GitHub paper-list repos — Search curated repository lists (e.g.
scene-text-detection-recognition-papers) alongside paper results. - Better deduplication — Title normalization is a rough heuristic; smarter deduplication could avoid showing the same paper twice.
- Synonym expansion — Expand common terms in strict mode (e.g. GAN → cGAN, WGAN, StyleGAN) to improve recall.
- Semantic strict mode — Use embeddings or cross-encoder reranking instead of keyword matching for relevance filtering.
- Citation counts for arXiv papers — Cross-reference arXiv results with OpenAlex to retrieve citation data.
