Skip to main content
Glama

codebase_search

Search your indexed codebase using natural language queries to find relevant code chunks.

Instructions

Semantic search across an indexed codebase. Only use after codebase_index is complete (check codebase_status first). Returns relevant code chunks matching a natural language query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return. Default: 10 (override globally via SEARCH_DEFAULT_LIMIT env var).
queryYesNatural language search query (e.g. 'authentication middleware', 'database connection setup').
minScoreNoMinimum RRF score threshold (0-1). Results below this are filtered out. Default: 0.10 (override globally via SEARCH_MIN_SCORE env var). Set to 0 to disable filtering.
fileFilterNoFilter results to a specific file path (relative).
projectPathNoAbsolute path to the project directory.
includeLinkedNoWhen true, also search across linked projects defined in .socraticode.json or SOCRATICODE_LINKED_PROJECTS env var. Results include a project label showing which project each result came from. Default: false.
languageFilterNoFilter results to a specific language (e.g. 'typescript', 'python').
Behavior4/5

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

No annotations provided, so the description bears the full burden. It indicates that the tool returns relevant code chunks without modifying the codebase, implying a read-only operation. However, it does not explicitly state that it is non-destructive or mention any potential side effects or error conditions. This is fairly transparent but leaves some ambiguity.

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 consists of two concise sentences. The first sentence states the purpose, and the second provides a crucial usage condition. No unnecessary words. Well-structured and front-loaded.

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 tool has 7 parameters and no output schema. The description explains the overall purpose and a key precondition. However, it does not describe the output structure (e.g., what fields are returned in code chunks) or any error handling. Given the complexity of the parameters, the description might benefit from more detail, but it covers the essential usage context.

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 input schema covers all 7 parameters with detailed descriptions, including defaults and environment variable overrides for some. The tool description does not add additional parameter semantics beyond what the schema provides. Baseline score of 3 is appropriate.

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 it performs semantic search and returns code chunks matching a natural language query. It distinguishes from sibling tools by specifying the precondition of indexing, making the purpose specific and clear.

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

Usage Guidelines5/5

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

Explicitly states to only use after codebase_index is complete and recommends checking codebase_status first. This provides clear when-to-use conditions and a prerequisite check, which helps the agent avoid errors.

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/giancarloerra/SocratiCode'

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