Skip to main content
Glama

file_search

Perform regex-based content search on remote servers to find error messages in logs or configuration entries, with optional context lines and case sensitivity.

Instructions

在远程服务器上搜索文件内容(grep),适合查找日志中的错误、配置项等

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes搜索的目标目录或文件路径
serverYes目标服务器名称
contextNo上下文行数
patternYes搜索模式(支持正则表达式)
maxResultsNo最大结果数
caseSensitiveNo是否区分大小写
Behavior3/5

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

With no annotations, the description carries the burden and does convey that the operation is a remote, content-based grep-like search, which implies read-only behavior. It does not mention permission prerequisites, potential performance cost on large paths, or how results are truncated, leaving some operational behavior undisclosed.

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?

One compact sentence contains the core action, the tool's nature (grep), and typical use cases with no redundant wording. It is appropriately front-loaded.

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

Completeness4/5

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

For a moderately parameterized tool with full schema coverage and no output schema, the description provides enough context for invocation and gives concrete use cases. It does not describe the exact result format, but the grep analogy and schema parameters (context, maxResults) make the expected output reasonably clear.

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?

The input schema already documents all 6 parameters with descriptions, so the baseline is 3. The description adds the grep analogy and use cases but no per-parameter details beyond what the schema provides.

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

Purpose5/5

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

The description states a concrete operation—searching file contents on a remote server via grep—and adds concrete use cases (finding errors in logs, config items). This clearly separates it from sibling file tools like file_read and file_list by emphasizing content search rather than reading or listing.

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

Usage Guidelines4/5

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

It gives explicit scenarios where the tool is appropriate: searching logs for errors and locating config items. It does not enumerate exclusions or compare directly with file_read/file_list/server_exec, so it stops short of full routing guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rowanlin-dev/cloud-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server