Skip to main content
Glama

List a remote directory

ssh_list_dir
Read-only

Lists files and folders in a remote directory over SFTP, returning entry type, size, and modification time for inspection.

Instructions

Lists the entries of a directory on a host over SFTP, with 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": {
      "host": "<host>",
      "path": "<path>"
    },
    "name": "ssh_list_dir"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesName of a configured host, as returned by ssh_list_hosts
pathYesAbsolute path, or one relative to the login directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-dev.1

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already establish readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful context by naming SFTP and the returned metadata fields, but it does not disclose behavior such as hidden-file handling, symlink behavior, sorting, pagination, or error conditions.

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 a single front-loaded sentence with no redundant wording. It communicates the operation, transport, and useful return fields efficiently.

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 simple two-parameter read-only directory listing, the description covers the core operation and return metadata, while annotations and schema cover safety and parameter semantics. It is still missing usage guidance and edge-case behavior, preventing a 5.

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 description coverage is 100%, and the schema already explains that host refers to a configured host and path may be absolute or relative to the login directory. The description does not add meaning beyond those schema descriptions, so the baseline of 3 is appropriate.

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 states a specific verb and resource: listing directory entries on a host over SFTP. It also identifies the returned metadata (type, size, modification time), which distinguishes it clearly from ssh_list_hosts, ssh_read_file, and ssh_exec.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit guidance on when to use it instead of ssh_exec, ssh_read_file, or ssh_list_hosts. It also does not mention that ssh_list_hosts may be needed to discover valid host values, even though the schema hints at this.

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