Metis · Librarian — Index Library Pdfs
index_library_pdfsBuilds or rebuilds a PaperQA2 index over PDFs in your library so queries can run without re-reading every document. Use it after adding papers or when forcing a full reindex.
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. "Malaria", "Epidemiology", "Methods").
scope: Which library to index. "default" = knowledge/library/ (all PDFs).
"ph_library" = knowledge/library/ph-background/ (public health background).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "index_library_pdfs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | default | |
| topic_filter | No | ||
| force_reindex | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |