Skip to main content
Glama

ssh_list_dir

List files and directories on a remote Linux server via SSH, with optional glob filtering and recursive listing to prevent output overload.

Instructions

List directory contents on the remote server.

Args: path: Directory path to list. Defaults to current working directory. pattern: Glob pattern to filter entries (e.g., "*.py", "Makefile"). recursive: If true, list recursively. max_entries: Maximum entries to return (prevents overwhelming output). host: SSH host alias from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.
patternNo*
recursiveNo
max_entriesNo
hostNo
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 mentions that max_entries prevents overwhelming output and that host uses a default, which adds some behavioral context. However, it omits details on error handling, return format, or what happens if the directory does not exist.

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 extremely concise and well-structured, with a one-line summary followed by clear parameter explanations. Every sentence adds value, with no redundant or irrelevant information.

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?

Given the lack of output schema and annotations, the description is incomplete. It does not describe the return value (e.g., list of file names) or error behaviors. The parameter explanations are thorough, but missing output details reduces overall completeness.

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%, so the description must compensate. It fully explains all 5 parameters, including defaults (e.g., path defaults to '.'), examples for pattern (e.g., '*.py'), and rationale for max_entries (prevents overwhelming output). This adds significant meaning beyond the schema's type definitions.

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?

The description clearly states it lists directory contents on a remote server with a specific verb ('list') and resource. It is distinguishable from siblings like ssh_read_file (reads file content) or ssh_find_files (searches files), but does not explicitly differentiate itself.

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 listing directory contents, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., ssh_find_files). The context signals include sibling tools, but the description itself lacks when-not-to-use or alternative recommendations.

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

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