ssh_grep
Search remote files for a pattern using grep, returning matching lines with file paths, line numbers, and optional context.
Instructions
Search for a pattern in files on the remote server using grep.
Returns matching lines with file paths and line numbers.
Args: pattern: Regular expression pattern to search for. path: Directory or file to search in. glob: Filter files by glob pattern (e.g., ".py", ".cpp"). max_results: Maximum number of matching lines to return. context_lines: Number of context lines to show before and after each match. case_insensitive: If true, ignore case when matching. host: SSH host alias from config. Uses default if omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| path | No | . | |
| glob | No | ||
| max_results | No | ||
| context_lines | No | ||
| case_insensitive | No | ||
| host | No |