Skip to main content
Glama
ifindv
by ifindv

ssh_list_files

Read-onlyIdempotent

List files and directories in a remote directory over SSH, including size, type, and modification time. Supports showing hidden files and output in markdown or JSON.

Instructions

List files and directories in a remote directory via SFTP.

This tool provides a directory listing with file metadata including size, type, and modification time.

Args: params (ListFilesInput): Validated input parameters containing: - session_id (str): SSH session identifier from ssh_connect - remote_path (str): Path to remote directory to list (e.g., "/var/log", "~", "/tmp") - show_hidden (bool): Show hidden files (starting with .), default False - response_format (ResponseFormat): Output format (markdown or json)

Returns: str: Directory listing with file details

Examples: - Use when: "List files in /var/log" -> params with remote_path="/var/log" - Use when: "Show all files including hidden ones in home directory" -> params with remote_path="~", show_hidden=True - Use when: "Check what's in /tmp" -> params with remote_path="/tmp" - Don't use when: Need to list files on local machine (use local filesystem instead)

Error Handling: - Returns "Error: Session not found" if session_id is invalid - Returns error if remote directory doesn't exist - Returns error if directory is not readable due to permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds behavioral context by listing error cases (invalid session, missing directory, permissions) and mentioning return of file metadata. This goes beyond annotations without contradicting them.

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

Conciseness4/5

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

The description is well-structured with sections for args, returns, examples, and error handling, but it is slightly verbose. Every sentence adds value, but a minor trim could improve conciseness.

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 (SSH session, multiple parameters, output schema exists), the description is complete. It covers all necessary aspects: purpose, parameters, examples, error handling, and output format. The presence of an output schema further reduces the need to explain return values.

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 description adds meaning beyond the input schema by explaining session_id as 'from ssh_connect', providing examples for remote_path, and clarifying show_hidden default. Although schema coverage is technically low, the description compensates with detailed parameter explanations.

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 lists files and directories in a remote directory via SFTP, specifying the verb 'list' and the resource 'remote directory'. It distinguishes itself from siblings like ssh_download_file and ssh_execute by focusing on listing.

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

Usage Guidelines5/5

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

The description provides explicit examples of when to use the tool (e.g., 'List files in /var/log') and explicitly states when not to use it ('Don't use when: Need to list files on local machine (use local filesystem instead)'). This provides clear guidance on appropriate context.

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

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