Skip to main content
Glama

Metis ยท Librarian โ€” Index Library Pdfs

index_library_pdfs

Index 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

TableJSON Schema
NameRequiredDescriptionDefault
scopeNodefault
topic_filterNo
force_reindexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, but the description details the indexing process (walks directories, uses PaperQA2 + Claude Haiku) and explains persistence for subsequent queries via ask_library(), providing solid behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (9 sentences), front-loads the main action, and introduces parameters in a clear list. Every sentence adds unique value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 optional params and an output schema, the description covers purpose, usage, behavior, and parameter details completely, leaving no significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining each parameter's meaning and effect: force_reindex (rebuild), topic_filter (folder name filter), scope (which library directory).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb-resource pair ('Build or rebuild a PaperQA2 index over the user's PDF library') and distinguishes the tool from siblings like ask_library which queries the index, making its purpose very clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is given: 'Run once after adding new papers, or with force_reindex=True to rebuild.' This clearly states when to use the tool, though it does not directly exclude alternatives like index_pdf_library.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server