Skip to main content
Glama
semantic-search

semantic-search

by kengo006

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CORPUS_ROOTNoPath to the text-layer corpus root directory. Can also be passed as a command-line argument to build_index.py and server.py.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
semantic_searchA

Semantic recall: retrieve text-layer passages by meaning, catching what keyword grep misses (paraphrase and cross-lingual matches).

Returns top-k fragments, each with file (relative path), page_start/page_end (for going back to the source PDF), score (cosine; higher = closer), and text (the fragment itself). ⚠ Recall layer only: verbatim quotes, page numbers, and emphasis must be verified against the source PDF. Never cite these fragments directly.

semantic_search_deepA

Deep recall: retrieve wide, widen each hit into its surrounding passage, then rerank with a cross-encoder and return the best few.

Use this deliberately, not by default. It is for one situation: the passage you need is in the corpus but sits below the plain-recall cutoff - the twentieth hit rather than the third. When plain recall is already precise, reranking can scatter it just as easily as it can help.

⚠ score here is a reranker logit, not a cosine. It orders the results and nothing else: there is no value at which it becomes "relevant", and scores from different queries are not comparable. recall_score keeps the original cosine alongside it. ⚠ Recall layer only, exactly as with semantic_search: verbatim quotes, page numbers and emphasis are verified against the source PDF, never cited from here.

⚠ First call downloads ~2.3 GB (the ONNX graph plus its external weight file) and is slow; later calls reuse the cached model. That is ten times the embedding model this project fetches by default - worth knowing before you invoke this rather than after. Requires the LanceDB backend. Point SEMANTIC_RECALL_RERANKER at a smaller cross-encoder if that is too much.

semantic_search_infoA

Report current index state: backend, model, chunk count, file count, build time, and the degradation registry's self-report - every category by name, with its count and one line of instruction.

⚠ Read the degradation block before treating any miss as evidence, and read it per category: under unreliable_recall a zero hit count proves nothing; under unreliable_order it still counts. status "unknown" means the registry could not be read - which is not the same as "no degraded files", and must not be rounded down to zero.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct role: semantic_search is default recall, semantic_search_deep is explicitly flagged as a deliberate escalation for passages below the plain-recall cutoff, and semantic_search_info reports index state only. The descriptions actively head off the main confusion (deep vs. plain recall) by stating when NOT to use deep search and warning that reranking can scatter already-precise results.

Naming Consistency4/5

All three names are lowercase snake_case sharing the semantic_search prefix, so they group predictably in a tool list. The only deviation is that the base tool is unsuffixed while the variants add _deep and _info, which is a minor and readable asymmetry rather than an inconsistency.

Tool Count4/5

Three tools is lean but each one earns its place: default recall, a costly opt-in rerank path, and a diagnostics endpoint. For a focused retrieval-only server this is well-scoped, though it sits at the low end and leaves little room for adjacent operations.

Completeness4/5

The surface covers the core lifecycle of a recall server: query, high-recall query, and inspect index/degradation state, with degradation reporting that lets agents interpret misses correctly. Minor gaps exist — no tool to build or refresh the index, no way to scope a search to specific files, and no listing of indexed files beyond counts.

Maintenance

ActivityNo data
ResponsivenessOutdated data