Skip to main content
Glama

searchCode

Perform lexical code search across indexed repositories, with optional filtering to a single repo for targeted results.

Instructions

Lexical code search via an embedded Zoekt index (lazy-started on first call). repo, if given, is applied as a Zoekt r: query filter scoping results to that one indexed repo; omitted, results span every indexed repo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

The description adds meaningful behavioral context beyond the schema: it mentions the index is 'lazy-started on first call' and explains how the repo filter transforms to a Zoekt 'r:' query. This goes beyond a bare statement of function. However, with no annotations, the description still lacks disclosure on result format, limits, or potential side effects (e.g., indexing delays), so it is not fully transparent.

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 two well-structured sentences: the first clearly states the tool's purpose and mechanism, the second explains the repo parameter's behavior. Every sentence contributes unique information with no filler or 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?

For a search tool with an output schema present, the description sufficiently covers the core functionality, the lazy-start behavior, and the repo scoping logic. It misses some contextual information like query syntax or limits, but these are less critical given the output schema and the fact that the core behavior is clearly explained. Sibling tools like getIndexStatus could complement but are not strictly required to be mentioned.

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?

The schema provides no descriptions (coverage 0%), so the description must compensate. It does explain 'repo' semantics in detail (Zoekt r: filter, scoping vs. all repos), which adds real meaning. However, the required 'query' parameter is not described beyond the general 'lexical code search' phrase, leaving its syntax and expected format ambiguous. Thus partial compensation only.

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 'Lexical code search via an embedded Zoekt index', specifying the verb (search), the resource (code), and the distinguishing mechanism (lexical via Zoekt). This differentiates it from sibling tools like semanticSearch, which implies a non-lexical search, and also names a concrete implementation detail (Zoekt index).

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 implies usage by specifying 'lexical code search' and the repo scoping behavior, but it does not explicitly state when to prefer this over semanticSearch or other siblings, nor does it provide exclusions or alternative tool references. The repo filter is explained functionally, but this is more behavioral than usage guidance.

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