Search text inside files
search_contentSearches text files for a string or regular expression and returns matching file, line, and text; skips binary and oversized files.
Instructions
Searches for a string or regular expression inside text files and returns file:line: text. Binary and large files are skipped.
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_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Where to search | . |
| query | Yes | String or regular expression | |
| ignore | No | Additional names/globs to skip | |
| include | No | File glob, e.g. `*.js` or `src/**/*.ts` | |
| is_regex | No | Treat query as a regular expression | |
| files_only | No | Only list matching files with their match counts | |
| max_results | No | Maximum number of matches | |
| context_lines | No | Show this many lines before and after each match | |
| max_file_size | No | Skip files larger than this size (bytes) | |
| case_sensitive | No | Match case |