Skip to main content
Glama

list_dir

Lists files and subfolders in a host directory, resolving relative paths from the home directory so you can inspect remote folders over SSH.

Instructions

List a folder on a host.

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": "list_dir"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
pathYesA path on the host; relative paths start at the home directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure, and it delivers almost none. It does not say whether the listing is recursive, whether hidden files or metadata (size, permissions, timestamps) are returned, whether access requires prior request_access, or how errors and large directories are handled.

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

Conciseness3/5

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

The single sentence is front-loaded and free of padding, so it is structurally clean. However, at this length the brevity reads as under-specification rather than economy, given the tool has two required parameters and no annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and only 50% parameter coverage, the description should explain the listing's scope and return shape. Instead it is a six-word sentence, leaving an agent unable to predict the result or the host argument's format before calling.

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 coverage is only 50%: the path parameter is documented in the schema (relative paths start at the home directory), but host is undocumented in both places. The description adds no meaning beyond the schema and does not clarify what host accepts (a name from list_hosts? an address?).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a verb and resource ("List a folder on a host"), so the general operation is inferable, but "list a folder" is ambiguous about whether it returns the folder's entries, its metadata, or a recursive tree. It also does nothing to separate itself from sibling listing tools such as list_hosts or list_sessions.

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 contains no when-to-use guidance, no prerequisites (e.g., does the host need to be reachable/authorized?), and no mention of alternatives for hierarchical or filtered listing. The agent must guess the intended context entirely.

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