search_source
Searches source files for literal text, strings, comments, or config keys, returning matching lines with file, line number, and total count; filter by path to narrow results.
Instructions
Searches the text of the source files of the graph and returns one line per matching line: file, line number and text, then a count. Use it for what is not a name in the graph: a string, a message, a comment, a configuration key. pattern is literal text, letter case ignored, matched inside one line; special are only .* (any characters), ^ first and $ last (the ends of the line) and a backslash before a character meant literally. path narrows the search to files whose path matches (tests/.*). For where a name is defined use find_definitions; for who uses a symbol use find_usages, which follows aliases and re-exports; to read around a match use read_source. It reads source files of the graph only. One call returns at most 200 matches, says the total and the match to go on from: pass that number as first. A line longer than 300 characters is cut.
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": {
"pattern": "<pattern>"
},
"name": "search_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Part of a file path, literal text with optional .* wildcards: only matching files are searched. | |
| first | No | Number of the first match to return (default 1); a cut answer names the next one as :next. | |
| pattern | Yes | Text to search for, as it is written in the code; .* stands for any characters, letter case is ignored. |