Skip to main content
Glama
di5rupt0r

MCP Codebase RAG Server

by di5rupt0r

search_codebase

Search an indexed codebase for relevant code snippets using semantic vector search. Optionally filter by project or file type.

Instructions

Search the indexed codebase for relevant code snippets.

Args:
    query: Search query text
    top_k: Number of results to return (default: 5)
    project: Project name to search within (optional)
    file_types: List of file extensions to filter (e.g., [".py", ".js"])

Returns:
    Dictionary with search results, metadata, and timing info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
projectNo
file_typesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description discloses the return format (dictionary with results, metadata, timing) and that the search operates on an indexed codebase. However, with no annotations, it does not explicitly state read-only behavior, side effects, or any rate limits or authentication requirements.

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 well-structured with dedicated Args and Returns sections, each parameter is concisely explained, and the primary purpose is front-loaded in the first sentence.

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?

The description covers query parameters and return structure well, but it omits the dependency on the codebase being indexed (likely via reindex_project). This is a meaningful gap given the sibling tools and the workflow context.

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

Parameters5/5

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

The description provides detailed explanations for every parameter, including default values and an example for file_types. Since the input schema has no descriptions (coverage 0%), this fully compensates and adds significant meaning beyond the structured 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 the tool searches an indexed codebase for code snippets, a specific verb+resource combination. This distinguishes it from sibling tools like reindex_project or get_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like get_files or list_indexed_projects. It does not mention prerequisites such as the need to index the codebase first, nor does it offer exclusions or alternative tool suggestions.

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/di5rupt0r/codebase-rag'

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