Skip to main content
Glama

semantic_search

Search indexed source and documentation using hybrid lexical and vector retrieval, with support for git history, paper trail, and call graphs.

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.

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?

No annotations are provided, so the description carries the full burden. It thoroughly explains the scoring mechanism (BM25 + vector cosine similarity), retrieval modes per hit, fallback behavior, and validation against current source. This is excellent transparency.

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

Conciseness5/5

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

The description is concise at 5 sentences, with the main purpose front-loaded. Every sentence provides useful information without redundancy.

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 absence of both annotations and output schema, the description covers core behavior well but could elaborate on the exact output structure and any rate limits or auth needs. It is fairly complete for a search tool.

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 at 29%, but the description adds context for the 'explain' parameter and the retrieval_mode response field. However, it does not elaborate on 'limit', 'include_graph', 'graph_limit', or 'worktree', which remain underdocumented. The description adds moderate value 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.', providing a specific verb and resource. It distinguishes this tool from siblings like commit_search or rationale_search by focusing on indexed source and docs with a blended score.

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 when to use the tool and the meaning of the score, but does not explicitly contrast with sibling tools or provide when-not-to-use conditions. It does mention the explain flag for detailed breakdowns, which is helpful.

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