Skip to main content
Glama

Metis · Librarian — Build Pdf Knowledge Db

build_pdf_knowledge_db

Index PDFs into a named semantic knowledge database layer for semantic search using local embeddings with no API key; optionally force re-indexing existing files.

Instructions

Index a knowledge database layer from PDFs into the semantic knowledge base.

Uses local nomic-embed-text-v1.5-Q (fastembed, ONNX) — no API key required.
Each database is a named layer: 'ph-background', 'epi-methods',
or any custom database slug created via create_knowledge_database().

Args:
    database:      Slug of the knowledge database to build (default: 'ph-background').
    force_rebuild: Re-index even files already indexed in this database.

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": "build_pdf_knowledge_db"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoph-background
force_rebuildNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real traits: embeddings run locally via fastembed/ONNX with no API key, and default behavior skips already-indexed files while force_rebuild overrides that. It stops short of saying whether force_rebuild discards existing vectors (destructive or not), how long a build takes, or what happens on a bad slug.

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?

Front-loaded purpose sentence followed by the embedding backend note and a compact Args block; nothing is wasted. The Args block largely restates the schema, but that is justified given 0% schema description coverage.

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

Completeness3/5

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

An output schema exists so return values needn't be explained, but the description leaves out prerequisites (which PDFs get picked up — tracked files? the library?) and its position relative to the many sibling indexing tools. For a build/index operation with zero annotations, that is a noticeable gap.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate — and it does, documenting both parameters with meaning beyond type: 'database' is a named layer slug with example values, and 'force_rebuild' re-indexes files already indexed. It omits any validation detail (must the slug pre-exist? is it case-sensitive?), which keeps it from a 5.

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?

States a specific verb and resource: 'Index a knowledge database layer from PDFs into the semantic knowledge base', and names the create_knowledge_database() counterpart. However, it does not distinguish itself from the many other indexing siblings (index_library_pdfs, index_pdf_library, index_pending_layers, kg_index_notes), so an agent still has to infer which indexer applies.

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

Usage Guidelines3/5

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

Usage is only implied — 'each database is a named layer' plus the create_knowledge_database() reference hints that a layer must exist first. There is no explicit 'use this instead of index_library_pdfs when…' routing, and no statement of when not to run it or what happens if the slug is unknown.

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

Deploy Server

Other Tools