Skip to main content
Glama
SSH MCP Server
by termau

list_remote_directory

Read-only

List files and directories in a remote server directory over SSH, returning each item's name, type, size, and modification time.

Instructions

List contents of a directory on a remote server.

Parameters:

  • connection: Name of the connection (from list_connections)

  • path: Absolute path to the directory on the remote server

Example usage: list_remote_directory("web1", "/var/log")

Returns a list of files/directories with name, type, size, and modification time.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connection": "<connection>",
      "path": "<path>"
    },
    "name": "list_remote_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the directory on the remote server
connectionYesName of the SSH connection to use

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already establish readOnlyHint=true, so the safety profile is covered. The definition adds value by describing the return payload (name, type, size, modification time), which matters because there is no output schema; it omits error behavior, whether hidden files or symlinks are included, and any sorting or pagination.

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?

It is front-loaded with the core action and then structured into parameters, example, and return value. The parameter list largely duplicates the schema, which is mild redundancy but aids quick reading and doesn't bloat the text.

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?

Describing the return shape is important since no output schema exists, and that gap is filled. For a simple two-parameter read tool this is nearly enough, but error handling and edge-case behavior on the remote path remain unspecified.

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?

Schema coverage is 100%, so both the connection and path parameters are already documented in the schema. The description restates them plus an example call, adding a little practical clarity but little meaning beyond the structured fields; baseline 3 applies.

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 definition names a specific verb and resource: 'List contents of a directory on a remote server', which is clearly distinct from siblings like read_remote_file and list_connections. It does not explicitly contrast itself with those siblings, but the operation is 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 definition points to list_connections for obtaining the connection name and supplies a concrete example, which implies the workflow. However, it never states when to prefer read_remote_file or download_file or what happens on an invalid path, so the guidance is implied rather than explicit.

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