Skip to main content
Glama

files/list

Read-onlyIdempotent

Inspect one directory's immediate entries in ls -l style: type, permissions, owner, group, size, modification time and symlink targets. Read-only, non-recursive.

Instructions

Lists the entries of ONE directory like ls -l (dotfiles, . and .. are hidden unless all: true): type and permissions, link count, owner, group, size, modification time and symlink targets (symlinks are shown, never followed). Read-only, not recursive, no entry cap; path must be absolute. For a recursive or filtered search use files/find, for a directory's total size disks/usage, for a file's MIME type files/filetype. On permission denied retry with privileged: true if granted (root calls also need a paths: entry covering the path). Text output is ls -l lines (Directory is empty. when empty; long: false gives names only, directories suffixed /). output_format: json returns an array of objects (name, type, mode, mode_octal, links, owner, group, uid, gid, size, modified, is_dir, target), [] when empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoInclude dotfiles, . and .. (ls -a)
longNoLong listing like ls -l: type+permissions, links, owner, group, size, date, symlink target. Default true; false lists names only
pathYesAbsolute path of the directory to list
sortNoSort by name (default), size (largest first) or time (newest first)
reverseNoReverse the sort order (ls -r)
dirs_firstNoList directories before files
privilegedNoRun as root. Needs a grant for this tool in mcp-sudo.yaml and a `paths:` entry covering the path, otherwise refused
numeric_idsNoShow numeric uid/gid instead of names (ls -n)
output_formatNoUse json for structured output (yaml, table and wide return the same JSON); default is text
human_readableNoSizes like 4.0K, 1.5M (ls -h); default is bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.1
    • changedInput schema / properties / output_format / description
      Previous value: -"Desired output format (e.g. json, yaml, table, wide). Defaults to text"New value: +"Use json for structured output (yaml, table and wide return the same JSON); default is text"
    • changedInput schema / properties / path / description
      Previous value: -"Directory path to list"New value: +"Absolute path of the directory to list"
    • changedInput schema / properties / privileged / description
      Previous value: -"Set to true to run as root"New value: +"Run as root. Needs a grant for this tool in mcp-sudo.yaml and a `paths:` entry covering the path, otherwise refused"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: not recursive, no entry cap, symlinks shown but never followed, root calls require a `paths:` entry in mcp-sudo.yaml, and the exact empty-result markers ('Directory is empty.' / []) are disclosed.

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?

Front-loaded with the core semantics and every clause carries information (scope, exclusions, failure mode, output format). It is dense to the point of being a single long paragraph, which slightly hurts scanability.

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 no output schema, the description compensates by enumerating the JSON return fields and the text/empty formats; all 10 parameters and the recommended fallbacks are covered, so an agent can call it correctly without further context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description adds cross-parameter behavior the schema does not state: the list of JSON object fields returned, that non-text formats all yield the same JSON, and the symbolic-link non-following guarantee tied to the listing.

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?

States a specific verb+resource (lists the entries of ONE directory) with the exact scope and output shape ('like ls -l'), and explicitly names the sibling tools it is not (files/find, disks/usage, files/filetype) with the condition that selects each.

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?

Gives explicit routing rules for alternatives (recursive/filtered → files/find, total size → disks/usage, MIME → files/filetype) and a concrete remediation path for failure ('on permission denied retry with privileged: true if granted').

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