Skip to main content
Glama

search_pdf_knowledge

Find relevant information from your PDF knowledge base using semantic search. Retrieve cited excerpts from indexed documents by combining multiple databases.

Instructions

Semantic search across one or more knowledge database layers.

Meaning-based (vector) search over your knowledge-base PDF chunks — the RAG
retrieval tool behind grounded, cited answers. For exact keyword matches use
search_fulltext; for reference metadata use search_library; for your own
notes/memory (not documents) use semantic_search.

Searches indexed PDF chunks using 768-dim nomic-embed vector similarity.
You can search a single layer or combine layers (e.g. PH background + HAT specialist).

Args:
    query: Natural language question or keyword phrase to embed and match.
    databases: List of database slugs to search; pass None (the default) to
        search all indexed databases. Examples: ['ph-background'],
        ['hat-specialist', 'epi-methods'].
    top_k: Number of results to return (default 8).

Returns:
    A single TextContent listing the top-ranked PDF chunks (title, similarity
    score, layer, domain, page, source file, and an excerpt), or a message if
    nothing is indexed yet or no chunks match the requested databases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
databasesNo
top_kNo

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 search uses 768-dim nomic-embed vector similarity, indexes PDF chunks, and returns specific fields (title, similarity score, layer, domain, page, source file, excerpt). It also covers edge cases like missing index or no matches. It does not explicitly state read-only behavior, but the nature of search implies it; still highly 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 summary line, explanatory paragraph, parameter details, and return description. It front-loads purpose. Slightly lengthy but all information is relevant and earned; no wasted words.

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?

Given the tool's complexity (vector search, multiple databases, RAG context), the description covers purpose, alternatives, parameters, technical details, and return format. It also handles edge cases. With an output schema present, the return description adds value beyond what schema provides.

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 description coverage is 0%, but the tool description fully compensates by describing each parameter: query as a natural language phrase, databases as a list of slugs or None (with examples), and top_k with default 8. This adds meaning beyond the schema's type and title.

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 opens with a clear verb+resource statement: 'Semantic search across one or more knowledge database layers.' It further specifies it's a vector search over PDF chunks for RAG retrieval, and explicitly distinguishes from sibling tools search_fulltext, search_library, and semantic_search, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description explicitly tells when to use this tool versus alternatives: 'For exact keyword matches use search_fulltext; for reference metadata use search_library; for your own notes/memory (not documents) use semantic_search.' It also explains the ability to combine multiple database layers, providing clear guidance on usage context.

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