Skip to main content
Glama

ssh_file_list

Read-only

List remote directory entries with size, mode, owner, and modification time. Get clear feedback on access-denied or truncated listings, with recursive and pattern-filter options.

Instructions

Lists a directory on a server: every entry with its size, mode, owner and modification time, as fields. A directory it was not allowed to enter is named rather than left out, and a listing cut short by the output limit says so. To see what is inside a file, use ssh_file_read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory to list.
sudoNoList as root, for directories the profile user cannot open. Default: false
patternNoGlob matched on the machine: "*.conf". Without it every entry comes back.
profileYesMachine name.
recursiveNoDescend into subdirectories. A deep tree is cut at the output limit and says so. Default: false

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=limited", "jobs[].state=lost" — and only the values this answer actually used are listed.
entriesNo
truncatedNoThe output limit cut the answer: the directory holds more than entries lists.
unreadableNoDirectories nobody was allowed to enter. Their contents are missing from entries, and a list short by the one that mattered looks complete.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv2.3.3
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "entries": {
      +      "items": {
      +        "properties": {
      +          "group": {
      +            "type": "string"
      +          },
      +          "mode": {
      +            "description": "Octal, as chmod takes it: \"644\", \"4755\" — not the rwx letters ls prints.",
      +            "type": "string"
      +          },
      +          "mtime": {
      +            "description": "Seconds since epoch, UTC.",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "Name inside the listed directory; with recursive, the path below it. Never a full path, so it reads the same either way.",
      +            "type": "string"
      +          },
      +          "owner": {
      +            "type": "string"
      +          },
      +          "size": {
      +            "type": "number"
      +          },
      +          "target": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "type": {
      +            "description": "What the entry is, which decides what size means for it. file — a regular file, and size is its bytes; dir — a directory: size is the directory entry itself, never the sum of what it holds; symlink — a symbolic link — target says where it points, and size is the length of that path; other — a socket, fifo or device node: there is no content to read here.",
      +            "enum": [
      +              "file",
      +              "dir",
      +              "symlink",
      +              "other"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "legend": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "What the words in this answer mean. A key names the field before the value — \"state=limited\", \"jobs[].state=lost\" — and only the values this answer actually used are listed.",
      +      "type": "object"
      +    },
      +    "path": {
      +      "type": "string"
      +    },
      +    "truncated": {
      +      "description": "The output limit cut the answer: the directory holds more than entries lists.",
      +      "type": "boolean"
      +    },
      +    "unreadable": {
      +      "description": "Directories nobody was allowed to enter. Their contents are missing from entries, and a list short by the one that mattered looks complete.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses useful behavioral edge cases: unreadable directories are named rather than silently omitted, and listings truncated by the output limit are explicitly flagged. This gives the agent accurate expectations for permission failures and large listings.

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?

Three tight sentences with no filler: core purpose first, then key behavioral guarantees, then the routing note to ssh_file_read. Every sentence earns its place.

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?

With a readOnlyHint, 100% schema parameter coverage, and an output schema present, the description covers the remaining contextual needs: result contents, error behavior, truncation signaling, and the relationship to the closest sibling. Nothing essential is missing.

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%, so the input schema fully documents all five parameters. The description adds context about output fields and truncation but not new parameter-level semantics, matching the baseline for fully documented schemas.

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 opens with a specific verb and resource: 'Lists a directory on a server' and names the returned fields (size, mode, owner, modification time). It distinguishes itself from ssh_file_read by explicitly directing file-content needs to that sibling.

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?

It clearly states the tool's use case (listing directories) and provides an explicit alternative for the adjacent case ('To see what is inside a file, use ssh_file_read'). No ambiguity remains about which sibling to pick for file-content access.

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

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

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