localSearchCode
Search local codebases for patterns, symbols, and text using ripgrep. Find functions, classes, variables, and imports with advanced regex or literal matching.
Instructions
Search code patterns [LOCAL: ripgrep] - START HERE for code questions
Without LSP:
localGetFileContent(matchString) for context
lineHint is 1-indexed (first line = 1)
filesOnly=true for fast discovery
type filter (ts, js, py) faster than globs
path="/workspace/src", pattern="function handleAuth", type="ts"
path="/workspace", pattern="export.*UserService", perlRegex=true
path="/workspace", pattern="TODO", filesOnly=true
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queries | Yes | Queries for localSearchCode (1–5 per call). Review schema before use. | |
| responseCharOffset | No | Character offset for top-level bulk response pagination across results[]. Use when a multi-query response was auto-paginated. | |
| responseCharLength | No | Character budget for top-level bulk response pagination across results[]. Overrides the shared default for this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Array of results, one per input query, discriminated by status | |
| responsePagination | No | Pagination metadata for top-level bulk response pagination across results[] |