Metis ยท Librarian โ Index Library Pdfs
index_library_pdfsIndex PDFs in your local library using PaperQA2 to enable querying without re-reading files. Supports topic filtering and scoped indexing.
Instructions
Build or rebuild a PaperQA2 index over the user's PDF library.
Walks knowledge/library/ (all subdirectories), collects PDFs, and indexes
them with PaperQA2 + Claude Haiku. The index is persisted so that
ask_library() can query it without re-reading every PDF.
Run once after adding new papers, or with force_reindex=True to rebuild.
Args:
force_reindex: Rebuild from scratch even if an index already exists.
topic_filter: If given, only index PDFs whose parent folder name
contains this string (e.g. "NTD", "Epidemiology", "Methods").
scope: Which library to index. "default" = knowledge/library/ (all PDFs).
"ph_library" = knowledge/library/ph-background/ (public health background).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | default | |
| topic_filter | No | ||
| force_reindex | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |