search_in_file
Find text within a single file by keyword or pattern. Returns all matching lines with context, line numbers, and optional case sensitivity.
Instructions
Search for a keyword within a single file. Returns all matching lines 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": {
"filePath": "<filePath>",
"keyword": "<keyword>"
},
"name": "search_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | The keyword or pattern to search for | |
| filePath | Yes | Path to the file to search within | |
| maxResults | No | Maximum number of results to return (default: 100) | |
| caseSensitive | No | Whether the search should be case-sensitive (default: false) | |
| includeLineNumbers | No | Whether to include line numbers in results (default: true) |