Skip to main content
Glama

ssh_list_directory

Read-onlyIdempotent

List remote directory contents via SSH, returning file names, types, sizes, permissions, and last-modified timestamps.

Instructions

List the contents of a directory on a remote SSH host.

Returns file names, types, sizes, permissions, and last-modified timestamps. Directories are listed before files, both sorted alphabetically.

Args: alias: Host alias. remote_path: Directory path to list (default '~' = home directory). limit: Maximum number of entries to return. Useful for large directories like /proc or /var/log. Omit to return all entries. response_format: 'markdown' (default) or 'json'.

Returns: Directory listing with columns: Type | Name | Size | Permissions | Modified. JSON format: {path, total, count, truncated, entries: [{name, type, size, permissions, modified}]}

Examples: - Browse home dir: ssh_list_directory(alias='web') - List /var/log: remote_path='/var/log' - List /etc/nginx: remote_path='/etc/nginx'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYes
remote_pathNo~
limitNo
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate a safe read-only operation. The description adds behavioral details such as sorting order (directories first, then alphabetically) and default path handling, providing useful context beyond the annotations.

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 concise: an initial summary sentence, followed by clear sections for args, returns, and examples. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the tool's complexity (4 parameters, output schema, no nested objects), the description covers all aspects: parameter meanings, return format (both markdown and JSON), sorting behavior, and practical examples. It is fully adequate for agent use.

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?

The input schema has zero description coverage, but the description thoroughly explains each parameter (alias, remote_path, limit, response_format) with details and examples, fully compensating for the missing schema descriptions.

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 that the tool lists directory contents on a remote SSH host, with a specific set of attributes (file names, types, sizes, etc.). It distinguishes itself from sibling tools like ssh_read_file and ssh_run_command by focusing on directory 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?

The description explains what the tool does and provides examples, giving clear context for when to use it. However, it does not explicitly mention when not to use it or alternatives, though this is implicit from sibling names.

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/muradmalik23/sshand'

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