Skip to main content
Glama

fs_list

Lists files and subdirectories within a sandboxed directory, with options to filter by pattern, search recursively, include hidden entries, and limit results.

Instructions

列出沙箱目录中的文件与子目录。

Args: path: 相对于沙箱根目录的路径,默认 "."。 pattern: 文件名匹配模式,默认 "*"。 recursive: 是否递归子目录。 include_hidden: 是否包含以点开头的隐藏文件。 max_results: 最多返回条目数,1-1000。

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

Input Schema

NameRequiredDescriptionDefault
pathNo.
patternNo*
recursiveNo
max_resultsNo
include_hiddenNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose the sandbox-root-relative addressing model and the 1-1000 bound on max_results, which are real behavioral constraints; however, it says nothing about ordering, errors on nonexistent paths, or whether pattern matches directories as well as files.

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 front-loaded one-line purpose followed by a compact Args block; every line carries information. The Args formatting is mechanical but efficient and nothing is redundant.

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?

An output schema exists, so return values need not be explained, and all five parameters are documented. The only remaining gap is the relationship to fs_search and match semantics for directories, which are secondary 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.

Parameters4/5

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

Schema description coverage is 0%, so the description must supply all parameter meaning, and it does: path is relative to the sandbox root with default '.', pattern is a filename glob with default '*', recursive, include_hidden (dot-prefixed files), and the max_results 1-1000 range. That adds defaults and semantics the bare schema titles do not convey, though it doesn't say whether pattern applies to directories.

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 states a specific verb and resource: list files and subdirectories in a sandboxed directory. That clearly distinguishes it from fs_read or fs_write, but it never mentions fs_search, the sibling that overlaps most closely (enumerating names versus searching contents), so the agent must infer the boundary.

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?

No guidance is given on when to use this tool rather than fs_search or fs_stat, and no prerequisites or exclusions are stated. The agent must infer that this is the enumeration primitive from the verb alone.

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