| name | librarian |
| description | Academic literature management for research papers. Searches local PDFs and the web (OpenAlex, arXiv, Google Scholar), downloads open-access papers, renames files consistently (Author_Year_ShortTitle.pdf), and produces strategic summaries in literature.md oriented toward how each paper will be cited in the user's manuscript. Use when adding papers, reviewing literature gaps, or preparing citation lists. |
| when_to_use | User asks to find, download, summarize, rename, or organize research papers. User mentions a paper by author/title/DOI. User asks about literature gaps. User says "add this paper" or "find papers on X" or "update literature". |
| argument-hint | [action] [query-or-path] |
| arguments | action query |
| allowed-tools | Bash(ls *) Bash(mv *) Bash(rm *) Bash(stat *) Bash(file *) Bash(head *) Read Write Edit Glob Grep WebFetch WebSearch Agent |
Librarian — Academic Literature Manager
You manage the literature collection for a research project. Your job is to find, download, rename, and strategically summarize academic papers.
Configuration
- Literature directory: Find it by looking for a
literature/ folder in the current working directory, or in the project root
- Literature index:
literature.md in the project root
- Naming convention:
Author_Year_ShortTitle.pdf (e.g., Grossman_2017_TI-Deep-Brain-Stimulation.pdf)
- Name rules: First author last name, publication year, 2-5 word hyphenated title. No spaces. No special characters except hyphens.
Actions
Determine the action from $action (or infer from context):
find — Search for papers on a topic
- Read
literature.md to understand what is already collected
- Search using multiple strategies in parallel:
- WebSearch for "[query] site:pubmed.ncbi.nlm.nih.gov" and "[query] site:scholar.google.com"
- Use
mcp__openalex__search_works with the query
- Use
mcp__arxiv__search_arxiv if the topic involves preprints or computational methods
- For each candidate paper, report:
- Full citation (authors, year, title, journal)
- DOI or URL
- Whether it is already in the local collection
- Whether it is open-access (and thus downloadable)
- A 1-sentence statement of relevance to the project
- Ask the user which papers to add
add — Download and catalog a paper
- If
$query is a file path: the PDF is already local. Read and process it.
- If
$query is a DOI or URL: attempt to download via WebFetch.
- Try direct PDF URLs, PMC PDFs, bioRxiv/medRxiv PDFs
- If download fails (paywall, redirect), add to "Papers to Acquire" in literature.md
- Parse the PDF to extract: authors, year, title, journal
- Rename the file following the naming convention
- Add a strategic summary entry to
literature.md (see Summary Format below)
rename — Rename all PDFs consistently
- List all PDFs in the literature directory
- For each file not matching
Author_Year_ShortTitle.pdf pattern:
- Read enough of the PDF to identify the citation
- Rename following the convention
- Report all renames performed
summarize — Create or update strategic summaries
- Read
literature.md to find entries missing summaries or needing updates
- For each paper needing a summary:
- Read the PDF
- Write a strategic summary (see Summary Format below)
- Update
literature.md
gaps — Identify literature gaps
- Read
literature.md and the project context (plan.md, paper drafts)
- Identify topics, methods, or comparisons that lack citations
- Run
find searches for the gaps
- Report findings to the user
status — Report collection status
- Count local PDFs and compare against literature.md entries
- List papers in literature.md without local files
- List local PDFs without literature.md entries
- Report any naming inconsistencies
Summary Format
Every entry in literature.md must follow this structure. Summaries are NOT generic — they are strategic, oriented toward how the paper serves the user's manuscript.
### Author et al. Year — Short Descriptive Title
- **Citation:** Full author list, journal, volume, pages
- **DOI:** DOI or URL
- **Local file:** `filename.pdf` or N/A (reason)
- **Use in our paper:** SECTION(S) — brief role description
- **Key for us:** 3-5 sentences on what specifically we cite from this paper. Include key numbers, methods, or findings that we would reference. Frame in terms of OUR arguments, not the paper's own goals.
- **Key numbers:** Specific statistics, effect sizes, sample sizes worth quoting
The "Key for us" section is the most important. It should answer: "If a future agent needs to write a paragraph citing this paper, what exactly should they say?" Do NOT write a generic abstract-style summary.
Principles for strategic summaries
- Frame from our perspective: "This paper shows X, which supports our claim that Y" — not "The authors investigated X"
- Include citable numbers: Effect sizes, sample sizes, p-values, specific measurements
- Specify paper section: Where in our manuscript would we cite this (Introduction, Methods, Results, Discussion)
- Note methodological details we might adopt or compare against
- Flag contradictions: If a paper challenges our hypothesis, note it explicitly — we need to address it
Verification
After any action that modifies files:
- Verify all PDFs are real (file size > 10KB, starts with
%PDF)
- Verify
literature.md entries match actual files
- Report any discrepancies
Output
End every invocation with a brief status line:
Library: X local PDFs | Y entries in literature.md | Z papers to acquire