Skip to main content
Glama
ssh-sftp-mcp

ssh-sftp-mcp

by endjoker

List a remote directory

sftp_list
Read-onlyIdempotent

Lists remote directory entries sorted by name with type, size, mtime, and permissions, paging large folders via cursor and never returning file contents.

Instructions

Lists remote directory entries sorted by name, with name, type, size, mtime and permission string; file contents are never returned. Large directories are paged with nextCursor; cursors are valid only in this process and are not a consistent snapshot under concurrent changes.

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": {
      "connectionId": "<connectionId>",
      "remotePath": "<remotePath>"
    },
    "name": "sftp_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
cursorNo
pageSizeNo
remotePathYes
connectionIdYes
remotePathStyleNoUse windows when the remote is Windows OpenSSH; accepts a full drive path or a plain relative pathposix

Output Schema

NameRequiredDescriptionDefault
entriesYes
pageSizeYes
truncatedYes
nextCursorYes
remotePathYes
totalEntriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses the result ordering, the exact field set, that file contents are excluded, and the paging contract. It also flags two non-obvious caveats: cursors are process-scoped and not a consistent snapshot under concurrent changes, which materially affects how an agent should page.

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?

Two tight sentences, front-loaded with purpose and return shape, then paging and consistency caveats. Every clause carries useful information and nothing is repeated from the schema or annotations.

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?

The paging and snapshot caveats plus the explicit field list make the return behavior clear, and an output schema exists to cover the response shape. However, with most parameters undocumented and no note on what connectionId or remotePath must reference, the definition is not fully sufficient for an agent to construct a correct call unaided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 20%, so the description must carry parameter meaning, but it addresses only the pagination parameters and even then indirectly (nextCursor, cursor lifetime). connectionId, remotePath, and pageSize get no explanation of meaning, format, or limits, leaving most of the five parameters undocumented in both places.

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?

States a specific verb and resource ('Lists remote directory entries') and enumerates the returned fields and sort order, so the agent knows exactly what it gets back. It does not explicitly name a sibling to contrast with, though 'file contents are never returned' implicitly separates it from the download/exec family, keeping it short of a 5.

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?

Usage is only implied: the description makes clear this is for browsing a directory, and the 'never returned' clause hints at when transfer tools are needed instead. There is no explicit when-to-use/when-not-to-use guidance or named alternative such as sftp_stat or sftp_transfer_list.

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