Search Literal
search.literalSearch for an exact string in workspace files. Narrow results with glob patterns and include surrounding context lines.
Instructions
Find exact text in indexed workspace files. Prefer this over regex when you already know the exact string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| needle | Yes | Exact text to search for without any regex syntax. | |
| pathGlobs | No | Optional relative glob patterns that narrow the search to specific folders or files. | |
| afterLines | No | Number of context lines to include after each match. Defaults to 1. | |
| maxResults | No | Maximum number of matches to return. Defaults to 100. | |
| beforeLines | No | Number of context lines to include before each match. Defaults to 1. | |
| caseSensitive | No | Set to false to perform a case-insensitive full-text match. | |
| workspaceRoot | No | Absolute workspace root to search. Defaults to the server workspace. | |
| autoEnsureIndex | No | Refresh the local index automatically before searching. Defaults to true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | ||
| matches | Yes | ||
| elapsedMs | Yes | ||
| queryKind | Yes | ||
| truncated | Yes | ||
| matchCount | Yes | ||
| plannerMode | No | ||
| fallbackReason | No | ||
| scannedDocCount | Yes | ||
| candidateDocCount | Yes | ||
| coveringGramCount | No | ||
| extractableAnchors | No |