Your Research Library
Your research library is a database file on your own computer that holds the papers and documents you collect. It keeps the text of every file you import, so you can search inside documents as well as their titles. The library server creates the file the first time it starts, at ~/.research-library/library.db unless you set another path.
The /library Command
Section titled “The /library Command”Type /library on its own to see a menu of five actions, or add an action name to go straight to it.
| Action | What It Does |
|---|---|
/library import [file path] |
Imports a PDF, Word document, Markdown or text file, then offers to add tags and a collection |
/library search [query] |
Searches across every document and shows titles, IDs, authors, years and snippets |
/library collections |
Lists your collections, then offers to browse one or create a new one |
/library stats |
Shows totals by file type and by year, the most used tags and the number of collections |
/library tags |
Shows the most used tags with their counts, and offers to list the documents with one tag |
You can also ask in plain words, for example “import this paper” or “search my library for burnout”. The managing-research-library skill then handles the request.
Two Ways to Add a Record
Section titled “Two Ways to Add a Record”Import a File
Section titled “Import a File”The library_import tool reads a file on your computer, extracts its text and stores the text in the library. It accepts four file types and rejects any other with an “Unsupported file type” message.
| File | Stored Type | Title Comes From |
|---|---|---|
PDF (.pdf) |
pdf |
The PDF’s own Title property, then the first line of text, then the file name |
Word (.docx) |
docx |
The first line of text, then the file name |
Markdown (.md) |
markdown |
The first # heading, then the file name |
Plain text (.txt) |
text |
The file name |
The importers do not find the authors, year, DOI, abstract or journal inside a file. Those fields stay empty unless you supply them at import or add them later. When you know the details, give them to Claude with the file, for example “import this PDF, authors Example and Sample, 2024, with its DOI”.
For a PDF, the library also saves the file’s own Author, Subject, Keywords and Creator properties, plus its page count, in a separate details field. These do not fill the authors field.
Save a Paper From Search Results
Section titled “Save a Paper From Search Results”The library_import_from_search tool adds a paper you found in a search, with no file needed. It stores the title, authors, abstract, year, DOI, link and source database. It also keeps the ready-made citations that came with the search result, and its stored type is reference.
Claude offers this after a research session. A literature watch run imports the papers it selects without asking, except on a dry run. A reference record has the abstract but not the full text, so a library search matches it on its title, authors, abstract and notes only.
What the Library Stores
Section titled “What the Library Stores”| Field | How It Gets Set |
|---|---|
| Title | Detected at import, or given by you. Required, with authors, when saving from search results |
| Authors | Only when you supply them, as a list of names. Required when saving from search results |
| Year | Only when you supply it |
| DOI | Only when you supply it |
| Abstract | Saved from search results, or added later with an update |
| Full text | Extracted from an imported file. Reference records have none |
| Link | Saved from search results only |
| File path | The path of the imported file |
| Notes | Your own notes, given at import or added later |
| Citations | The ready-made citations that came with a search result, saved from search results only |
| Date added | Set automatically |
The library holds no journal, document type or ISSN field. It also does not write citations itself, which is why reference records keep the citations that came with the search result.
Search Your Library
Section titled “Search Your Library”The library_search tool searches titles, authors, abstracts, full text and notes in one pass. It returns the best matches first, each with a short snippet from the document text, with the matching words marked. A reference record has no document text, so it comes back with an empty snippet even when its title or abstract matched.
You can use these search forms in the query you give Claude.
| Form | Example | Finds |
|---|---|---|
| Plain words | burnout nurses |
Records with both words |
AND, OR, NOT |
burnout NOT students |
Records that match the logic |
| Quoted phrase | "psychological safety" |
Records with the exact phrase |
Prefix with * |
motivat* |
Records with motivation, motivate, motivated and similar |
Put a hyphenated term or a DOI in double quotes, for example "self-determination". Without the quotes the search stops with a “Library error” message.
Claude returns 10 results unless you ask for more.
Browse and Filter
Section titled “Browse and Filter”The library_list tool lists records newest first, 20 at a time. You can narrow the list by collection, tag, publication year or stored type, such as pdf or reference. Ask for the next page to see more, and Claude moves on by the same number of records.
The list always runs newest added first. If you want the list by year or title, ask Claude to reorder the table it shows you.
View and Update a Record
Section titled “View and Update a Record”The library_get_document tool shows everything stored for one record, including its full text and tags. Every record has a number, its document ID, which you use to view, update, tag or delete it. /library and every search show these IDs.
The library_update tool changes the title, authors, year, DOI, abstract or notes of a record, and leaves every other field as it was. It cannot change the link, the stored type, the citations or the full text.
Fill In Details From a DOI
Section titled “Fill In Details From a DOI”When you know a paper’s DOI, Claude can fill in a record’s details for you.
- Give Claude the document ID of the record and the DOI of the paper it holds.
- Claude looks the DOI up with
scholar_get_paper, which returns the full publication details. - Claude writes the title, authors, year, DOI and abstract back to the record with
library_update.
The library has no field for the journal, volume, issue, pages or citations. To keep those, ask Claude to add them to the record’s notes, or save the paper again from the search results as a reference record.
Avoid Duplicates
Section titled “Avoid Duplicates”Neither import tool checks whether the library already holds the same paper or file. Importing the same file twice creates two records. Search your library for the title before you import, or ask Claude to check first. The library search does not cover the DOI field, so searching by DOI finds a record only when the DOI also appears in its text or notes.
Delete a Record
Section titled “Delete a Record”Limits of Importing
Section titled “Limits of Importing”- A scanned PDF that holds only images has no text to extract, because the library does not read images.
- The library cannot import password-protected files.
- A PDF the reader cannot open fails with a “Failed to parse PDF” message.
- Very large files, over 100MB, may time out during import.
- Title detection depends on how the file is laid out, so give your own title when the detected one is wrong.
Where the Library Lives
Section titled “Where the Library Lives”The library is one database file, ~/.research-library/library.db by default, plus any -wal and -shm files beside it. To keep it somewhere else, set RESEARCH_LIBRARY_PATH as API Keys and Configuration explains. Collections and Tags covers how to organise the records.

