search_in_file
Find the exact line and character position of a string within a file to locate code definitions and enable semantic analysis.
Instructions
Search for a string in a file to find its line and character position. Useful for finding the arguments for get_definition.
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>",
"query": "<query>"
},
"name": "search_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The string to search for | |
| filePath | Yes | The absolute path to the file to search in |