Skip to main content
Glama

search_files

Locate files on remote Linux servers by matching name patterns (like *.log) within a directory tree. Optionally filter by file type or specify a named SSH host.

Instructions

Search for files by name pattern in a remote directory tree.

Args: path: Root directory to search from. pattern: File name pattern (e.g., "*.log", "nginx.conf"). file_type: Filter by type: "file" (f), "dir" (d), or "any" (default). host_name: Named host from SSH_HOSTS config; uses default host if omitted.

Returns: List of matching file paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternYes
file_typeNoany
host_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that search is remote (via host_name from SSH_HOSTS config) and returns a list of paths, but it does not explicitly state whether the operation is read-only, whether it recurses into subdirectories, or error behavior. While 'directory tree' implies recursion, explicit disclosure of non-destructive behavior would strengthen transparency.

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?

The description is efficiently structured: a one-sentence purpose, a bullet-style Args section, and a Returns line. Every sentence provides useful information with zero filler, making it easy to parse quickly.

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 tool with four parameters and an output schema, the description covers all parameters and the return type, which is sufficient. It does not explicitly mention search semantics like case sensitivity or recursion depth, but the phrase 'directory tree' implies recursion, and the output schema exists to document return details. Overall, it is complete enough for the agent's needs.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates by documenting all four parameters with concrete examples ('*.log', 'nginx.conf'), allowed values ('file', 'dir', 'any'), and host configuration details. This adds meaningful semantics beyond the raw schema types and defaults.

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 clearly states the tool's function: 'Search for files by name pattern in a remote directory tree.' This is specific and distinguishes it from siblings like grep_file (content search) and list_directory (directory listing). The use of the verb 'search' and resource 'files' makes the purpose unambiguous.

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?

The description implies usage for finding files by name pattern (e.g., '*.log') but does not explicitly contrast with alternatives or state when not to use it. No mention of grep_file for content search or list_directory for directory browsing, so the agent has no explicit guidance on tool selection beyond the obvious purpose.

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/zhouxiangjing/mcp-ssh'

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