Skip to main content
Glama

semantic_search

Search indexed source and docs for semantically relevant matches, using blended lexical and vector scores for accurate retrieval.

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 of the checkout to scope reads to — pass a linked worktree to read its branch overlay. Defaults to the server's working directory. A path that is not a linked worktree of this repo is silently ignored: results then come from the indexed checkout, with no error.
graph_limitNo
include_graphNocompact
Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It transparently explains scoring (blended BM25+vector), the explain flag, retrieval_mode field, fallback to BM25-only, validation against current source, and the distilled_records behavior with caps and labels. This is unusually thorough and exceeds typical expectations.

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 a single dense paragraph but packs numerous details without fluff. It is not excessively long for the information conveyed, though it could benefit from structured sections (e.g., bullet points) for readability. The front-loaded purpose sentence is clear, and every clause contributes meaningful behavioral or output context.

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 tool's complexity (7 parameters, no output schema, no annotations), the description covers the most important behavioral aspects (scoring, retrieval_mode, fallback, validation) and relies on the schema for worktree and include. However, parameters like limit, graph_limit, and include_graph remain unexplained, and the description does not describe default behaviors for these. Overall, it is largely complete but misses some parameter context.

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

Parameters2/5

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

Schema description coverage is only 29%, so the description must compensate for undocumented parameters. It explains the 'explain' parameter explicitly and touches on 'include' indirectly (via fallback), but leaves limit, worktree, graph_limit, and include_graph unexplained. The output semantics (score, retrieval_mode) are covered, but input semantics beyond explain are not addressed, leaving a significant gap.

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 the tool's purpose: 'Search indexed source and docs.' This is a specific verb plus resource, and it distinguishes from other search tools like memory_search or rationale_search by focusing on source code and documentation. It also adds detail about scoring and retrieval modes, 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 Guidelines3/5

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

The description does not explicitly indicate when to use this tool versus alternatives. It describes behavior (scoring, fallback) but offers no guidance on when semantic_search is preferred over sibling tools like commit_search or memory_search. There is no mention of when not to use it or which alternative to pick.

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