Skip to main content
Glama

semantic_search

Search indexed source and documentation with blended lexical and vector relevance scores. Get per-hit retrieval mode and optional score breakdown to understand results.

Instructions

Search indexed source and docs. score is a blended relevance score combining BM25 lexical rank and (when an embedding model is installed) vector cosine similarity; pass explain=true for the per-component breakdown. Each hit carries retrieval_mode ('lexical', 'vector', or 'hybrid') so you can tell whether embeddings contributed without explain. Hits are validated against current source. Falls back to BM25-only (every hit 'lexical') when no embedding model is present. When a hit's symbol has a distilled decision record (the model's resolved root-cause / decision / outcome over the tracker thread that shaped it), it rides along as distilled_records — labeled unreviewed, capped at 2; empty for almost every hit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
explainNo
includeNoWhat to include: `git`, `papertrail` (both on by default), `generated`, `fallback` (off by default). Omit to keep defaults; an explicit list is the exact on-set.
worktreeNoAbsolute path to a linked git worktree you're working in. When set, results are served from that worktree's branch overlay (its committed + uncommitted changes) on top of the indexed checkout; omit to query the indexed checkout. An unrelated/invalid path falls back to it.
graph_limitNo
include_graphNocompact
Behavior5/5

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

The description thoroughly explains the blended score, retrieval modes, fallback behavior, and the distilled_records field. Since no annotations are provided, this detail is essential and well-covered without contradiction.

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 detailed and informative, front-loading the main purpose. While it could be slightly more concise, every sentence contributes useful behavioral context.

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?

Given the complexity (7 parameters, no output schema), the description covers many behavioral aspects but lacks details on several parameters. The result structure is well-explained, but parameter guidance is incomplete.

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

Parameters3/5

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

Schema description coverage is low (29%). The description adds value for the 'explain' parameter by mentioning its effect, but other parameters like limit, include, worktree, graph_limit, and include_graph are not elaborated upon beyond the schema.

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 clearly states 'Search indexed source and docs.' This is a specific verb+resource pair that distinguishes it from sibling tools like memory_search or rationale_search.

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 explains what the tool does and provides context about when embedding models are used, but it does not explicitly state when to avoid this tool or name alternatives. However, the context is clear enough for most use cases.

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/cq27-dev/rag-rat'

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