search_codebase
Search codebases semantically using natural language queries. Get matching code snippets with file paths, line numbers, relevance scores, and context after codebase initialization.
Instructions
Perform semantic search across a codebase. Uses vector embeddings to find relevant code sections based on natural language queries.
Returns:
Matching code snippets with file paths and line numbers
Relevance scores
File context and summaries
Requires init_codebase to be run first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rootPath": "<rootPath>",
"query": "<query>"
},
"name": "search_codebase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language query describing what you're looking for | |
| rootPath | Yes | Absolute path to the codebase root (must have been initialized) |