search_in_file
Find a query inside a file and return matches with surrounding context. Use it to locate specific content, with case-sensitive and max result options.
Instructions
Search for a query inside a file, returning matches with context
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": {
"file_path": "<file_path>",
"query": "<query>"
},
"name": "search_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| file_path | Yes | File to search | |
| max_results | No | Maximum matches to return | |
| context_lines | No | Lines of context around each match | |
| case_sensitive | No | Case-sensitive search |