Skip to main content
Glama

remote_search

Search text or regex across files on remote machines, using ripgrep when available and grep otherwise. Find symbols, references, and content matches over a persistent SSH connection.

Instructions

在远端按内容搜索(优先 ripgrep,远端没装时回退 grep)。适合跨文件找符号、找引用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo搜索起点,默认 SSH_REMOTE_BASE 指定的目录
typeNo按文件类型过滤:go / sql / md / yaml 等;与 include 二选一
contextNo每个匹配上下各带几行上下文,默认 0
includeNo文件名过滤,如 "*.go";不填则不限
patternYes要搜索的文本或正则
maxResultsNo最多返回行数,默认 100
caseSensitiveNo大小写敏感,默认 true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the ripgrep-then-grep fallback and that search happens over SSH on a remote (implying a connection requirement), but says nothing about authentication/permission needs, truncation behavior, or error modes when the remote is unreachable.

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

Conciseness5/5

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

Two compact sentences, zero filler. The core capability and the engine fallback are front-loaded, and the use case follows. Nothing is wasted.

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?

For a 7-parameter search tool with no output schema and no annotations, the description leaves the agent guessing about result shape, line truncation relative to maxResults, and failure behavior on an unreachable remote. It is adequate for invocation but thin on the operational context an agent needs.

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

Parameters3/5

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

Schema description coverage is 100%, so path, type, context, include, pattern, maxResults and caseSensitive are all already documented with defaults. The description adds no syntax, format, or precedence detail beyond the schema, so the baseline of 3 applies.

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+resource: content search on the remote host, plus the implementation detail (ripgrep with grep fallback). The phrase "按内容搜寻" implicitly contrasts with the name-based sibling remote_find, but no sibling is named explicitly, so it stops short of a 5.

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?

"适合跨文件找符号、找引用" gives a use case, which is better than nothing, but it is implied guidance rather than explicit when-to-use/when-not guidance. The obvious alternative (remote_find for filename matching, remote_list for listing) is never mentioned, leaving the agent to infer the boundary.

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