Skip to main content
Glama

List directory

ls
Read-only

Lists a directory on a peer, defaulting to the home folder, and returns JSON entries with each item's name, kind, size, and modification time.

Instructions

List a directory on the peer (default: home) as JSON entries: name, kind (file / dir), size, mtime.

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": {
      "peer": "<peer>"
    },
    "name": "ls"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
peerYesThe peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the bar is lower. The description adds genuine value by disclosing the result shape (JSON entries with name/kind/size/mtime), but says nothing about error behavior for a missing directory, permission requirements on the peer, or whether the listing is recursive or single-level.

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?

A single front-loaded sentence that delivers purpose, default argument value, and return shape with no filler whatsoever.

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 read-only listing tool with no output schema, the description covers what the tool does, the default argument, and the fields returned. Remaining gaps (path format, error cases) are minor for this level of complexity.

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 50%: `peer` is well documented in the schema itself, while `path` has no schema description. The description partially compensates by stating the default is the home directory, but it does not clarify accepted path syntax (absolute vs relative, tilde expansion) for the undocumented parameter.

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 plus resource ("List a directory on the peer") and even enumerates the returned fields, so an agent can tell this is a remote directory listing rather than a shell or file-read tool. It does not explicitly contrast itself with the closest siblings, so it falls 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 parenthetical "(default: home)" tells the agent it can omit the path, but there is no statement of when to prefer this over siblings such as `shell` or `info`, and no exclusions or prerequisites beyond the peer requirement.

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