Skip to main content
Glama

index_library_pdfs

Index your PDF library with PaperQA2 for fast, cited answers. Supports topic filtering and multiple scopes. Run after adding new papers or with force_reindex to rebuild.

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
force_reindexNo
topic_filterNo
scopeNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the indexing process, persistence, and the effect of force_reindex. It does not mention potential destructive actions or prerequisites, but overall behavior is transparent.

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

Conciseness4/5

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

The description is well-structured with a concise overview followed by an Args section. It is slightly verbose in parts but front-loaded with the core purpose. Minor redundancy could be trimmed.

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

Completeness4/5

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

Given the presence of an output schema, return values need no explanation. The description covers what the tool does, when to use, parameters, and effects. It lacks mention of prerequisites or failure modes but is otherwise complete for this complexity level.

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?

Schema has 0% description coverage, but the description provides detailed explanations for all three parameters: force_reindex, topic_filter, and scope, including examples for scope values. This fully compensates for the lack of schema descriptions.

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

Purpose4/5

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

The description clearly states the tool builds/rebuilds a PaperQA2 index over the user's PDF library, with specific verb and resource. However, it does not differentiate from the sibling tool 'index_pdf_library' which likely performs a similar operation, missing an opportunity to clarify distinction.

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?

The description advises running after adding new papers or with force_reindex=True, providing clear context for when to use. It does not explicitly mention when not to use or compare with alternatives, limiting full guidance.

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