Skip to main content
Glama

semanticSearch

Search a code repository using natural language queries, retrieving relevant code by fusing semantic vector matches with lexical search results.

Instructions

Natural-language code search over repo: embeds query, retrieves top vector matches from the repo's semantic index, fuses them with Zoekt lexical hits via reciprocal rank fusion. Requires the repo to have been indexed with the semantic extra installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 non-obvious behavior: embedding the query, retrieving top vector matches, and fusing with Zoekt hits via reciprocal rank fusion. It also flags a prerequisite. Lacks error/output details but is quite transparent for a search tool.

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?

Two concise sentences, front-loaded with purpose and algorithm. Every word adds value; no redundancy or filler.

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?

An output schema exists, so return-value discussion is unnecessary. The description covers purpose, mechanism, and prerequisite. It could benefit from mentioning 'limit' or an explicit sibling comparison, but overall it's sufficiently complete for moderate complexity.

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 coverage is 0%, so the description must compensate. It adds meaning to 'repo' and 'query' but omits 'limit', which has a default. Partial coverage—enough to understand core parameters but not complete.

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 performs natural-language code search over a repo, with a specific verb ('search') and resource ('repo'). It further differentiates from siblings like searchCode by detailing the semantic/vector retrieval and fusion with Zoekt lexical hits.

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?

It implies usage for natural-language queries and gives a prerequisite (repo must be indexed). It does not explicitly name alternatives or exclusions, but the context is clear enough to guide selection among sibling tools.

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/phuongddx/codeintel'

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