Skip to main content
Glama

List a directory in a sandbox

list_files
Read-onlyIdempotent

Lists files and folders in a sandbox directory one level deep, sorted by name, with symlinks shown as links and not followed. Use it to inspect directory contents; defaults to /home/user.

Instructions

List a directory in a sandbox. One level, sorted by name. A symlink is listed as a symlink, not followed. Defaults to /home/user. Needs file.read.

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": {
      "sandboxId": "<sandboxId>"
    },
    "name": "list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo/home/user
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds genuinely new behavior: only one level is returned, results are sorted by name, symlinks are reported rather than followed (a real safety/semantics detail for an agent), and the `file.read` permission requirement is disclosed before invocation.

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?

Five compact sentences, front-loaded with the verb and scope, then progressively finer detail (recursion depth, ordering, symlink handling, default, permission). Nothing is redundant with structured fields and no sentence is filler.

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 no output schema, the description carries the burden of return-shape disclosure and does reasonably well by stating ordering and symlink representation, though it never says what fields each entry contains. For a two-parameter read tool with rich annotations, everything needed to call it correctly is present.

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%: sandboxId is fully documented in the schema, but `path` has only a type and default. The description partially compensates by framing path as a directory to list and restating the /home/user default, but it does not say whether the path must be absolute or how relative paths resolve. Adequate but leaves a real ambiguity.

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 ('List a directory in a sandbox') and scopes it precisely as one level, sorted by name, which separates it in spirit from recursive searching siblings like search_files or find_in_files. It stops short of naming an alternative, so an agent must infer the boundary itself.

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?

The non-recursive 'one level' constraint implies this is for shallow directory inspection rather than content search, but the description never says when to prefer it over search_files, find_in_files, or list_snapshot_files. No exclusions or prerequisites beyond the permission note.

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