Skip to main content
Glama

ls

Read-onlyIdempotent

List a directory on a remote machine, showing name, size, mode, and modification time. Use it to inspect files in a fleet workspace, with optional glob patterns to exclude entries.

Instructions

List a directory on the remote machine: name, size, mode and modification time.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ls"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory to list: absolute, or relative to the workspace directory. Default: the workspace directory.
fleetNoFleet name. Omit to use the default.
ignoreNoGlob patterns to leave out.
contextNoContext name. Omit to use the default.
workspaceNoWorkspace id. Omit to use this session's workspace on the fleet.

Output Schema

NameRequiredDescriptionDefault
kindYes
mimeNo
noteNo
pathNo
sizeNo
countNo
linesNo
whereYes
sha256No
contentNo
entriesNo
new_fileNo
warningsNo
truncatedNo
workspaceYes
next_offsetNo
total_linesNo
omitted_bytesNo
written_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds that the target is a remote machine and which fields are returned, but says nothing about ordering, hidden files, symlink handling, or error behavior on a missing path — context that would be valuable beyond the annotations.

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

Conciseness4/5

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

A single front-loaded sentence with no filler. The list of returned attributes is slightly redundant given an output schema exists, but it is compact and readable.

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?

With rich annotations, a fully documented five-parameter schema, and an output schema covering return values, the description provides enough to call the tool correctly. Remaining gaps (result ordering, hidden-file inclusion, behavior on invalid paths) are minor for a read-only listing tool.

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%, with each of the five parameters documented (path defaulting to workspace, fleet/context/workspace selection, ignore globs), so the schema carries parameter meaning fully. The description adds no further parameter semantics, which is the expected baseline here.

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?

The description gives a specific verb and resource ("List a directory on the remote machine") and names the attributes returned (name, size, mode, modification time), so the agent knows exactly what operation this performs. It does not differentiate against siblings such as glob or read, which also touch the filesystem.

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?

There is no when-to-use or when-not-to-use guidance and no mention of alternatives like glob for pattern matching or read for file contents. The only implicit cue is "on the remote machine," which the agent must infer means this is the remote-filesystem listing tool.

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