Skip to main content
Glama

Semantic codebase search

search_codebase
Read-onlyIdempotent

Perform semantic search across indexed project files. Submit a plain-English query to retrieve relevant code chunks with similarity scores.

Instructions

Search indexed files by plain-English meaning via embeddings. Returns top-k file chunks with similarity scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject UUID (defaults to configured project)
queryYesPlain-English search query
kNoNumber of results (default 8, max 20)
scope_prefixNoOptional subdirectory scope prefix
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, indicating safe, idempotent, open-world behavior. The description adds methodological detail (embeddings) and output format (file chunks with similarity scores), enhancing transparency without contradiction.

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 a single, well-structured sentence that front-loads the core action and includes key details about the method and output. No superfluous information.

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 rich annotations and complete schema coverage, the description adequately explains the tool's function and return value. It mentions indexed files, embeddings, top-k results, and similarity scores. Minor omission: no mention of the default project behavior, but that is in the schema.

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?

Input schema has 100% description coverage for all 4 parameters, so the description does not add new meaning beyond what the schema provides. The description's mention of 'top-k' and 'plain-English' aligns with existing parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it searches indexed files using plain-English meaning via embeddings and returns top-k file chunks with similarity scores. It distinguishes from siblings like ask_codebase by specifying the method, but does not explicitly compare with other search tools.

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 explicit guidance on when to use this tool versus alternatives like ask_codebase or search_reports. The description implies use for semantic search but lacks when-not-to or exclusion criteria.

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/kensaurus/mushi-mushi'

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