Search Remote File Contents
ssh_grepSearch text across remote files or a single file over SSH using regex or literal matching. Apply glob filters, case-insensitive matching, and match limits to pinpoint results.
Instructions
Search text across remote files or a single file using regex or literal matching. Excludes .git and node_modules; uses ripgrep (rg) on Unix when installed.
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": {
"target": "<target>",
"path": "<path>",
"pattern": "<pattern>"
},
"name": "ssh_grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | Optional filename/path glob filter (e.g. '*.yaml', 'src/*.ts') | |
| path | Yes | Explicit remote absolute path (e.g. /etc/nginx/nginx.conf or C:\Services\app.json) or home-relative ~/... path. Bare relative paths are rejected. | |
| target | Yes | SSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target. | |
| literal | No | Treat pattern as a fixed literal string instead of regex (default: false) | |
| pattern | Yes | Regex or literal search pattern | |
| ignore_case | No | Case-insensitive search (default: false) | |
| max_matches | No | Maximum matching lines to return (default: 100) |