search_code
Search your indexed codebase for code snippets using semantic queries. Filter by file extension and adjust result count for precise retrieval.
Instructions
Performs a semantic search for code snippets relevant to the query. Note: Requires a project to be indexed first with reindex_codebase.
Parameters:
query: Search query
limit: Maximum results (default 5)
file_type: Optional file extension filter (e.g., "py", "java", "ts")
verbose: If True, include technical details like vectors and distances (default False)
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": {
"query": "<query>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| verbose | No | ||
| file_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |