Skip to main content
Glama
remote-ssh-mcp
by RuiFG

ssh_grep

Read-only

Search remote file content under a directory using extended regular expressions, with optional filename filters and bounded output—no remote helper installed.

Instructions

Search remote file content under a directory using the server's existing grep extended regular expressions. Optional include filters filenames. Output is bounded; no helper is installed remotely.

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": {
      "hostId": "<hostId>",
      "pattern": "<pattern>"
    },
    "name": "ssh_grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
limitNo
hostIdYesRequired stable host ID returned by ssh_list_hosts. Names are not accepted.
includeNo
patternYes
ignoreCaseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true, and idempotentHint=false, so the description's job is lighter. It still adds real value: it names the regex flavor (server's extended regular expressions, so no PCRE/lookarounds), states that output is bounded, and clarifies that no helper binary is installed remotely, explaining why semantics are server-grep-bound.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and scope, with no filler. The remote-execution caveat is compact and load-bearing rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description only says output is "bounded" without indicating the shape of a match (file path plus line numbers plus content?), and it omits path defaults and ignoreCase behavior. For a 6-parameter read tool with no structured return documentation, this leaves real gaps an agent would hit on first call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 17% across 6 parameters, so the description must compensate and largely does not. It covers pattern (ERE dialect), include (filename filtering), and loosely limit ("output is bounded"), plus path ("under a directory"), but says nothing about ignoreCase, the limit ceiling of 2000, or what path defaults to when omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Search remote file content under a directory" using the server's grep ERE dialect. This clearly distinguishes content search from sibling file tools like ssh_glob or ssh_read_file, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied — you use it to search file contents, and "Optional include filters filenames" hints at narrowing scope. There is no explicit "use this instead of X when..." routing against ssh_glob, ssh_read_file, or ssh_shell_exec, which is a meaningful gap given how many file-access siblings exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.