Skip to main content
Glama

List

list
Read-only

Inspect filesystem directories: show sorted entries at a chosen depth, paginate results with a cursor, and optionally include hidden/ignored items.

Instructions

List sorted directory entries and an ASCII tree. maxDepth=1 is top-level. maxEntries sets page size; continue with nextCursor. An incomplete first page also carries resourceUri for the whole list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory to list (default: first allowed root)
cursorNoOpaque pagination cursor; pass unchanged for the next page. Pages slice one snapshot taken on the first call; it expires after ~60s — re-request without a cursor if rejected.
maxDepthNoMax directory depth to traverse (default: 1 = top-level only; increase to recurse deeper)
maxEntriesNoPage size (default: 1000). Continue with nextCursor; an incomplete first page also carries resourceUri for the whole list.
includeHiddenNoInclude hidden items (starting with .)
includeIgnoredNoInclude ignored items (node_modules, .git, etc).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv2.1.5
    • changedInput schema / properties / maxEntries / description
      Previous value: -"Page size (default: 1000). Continue with nextCursor; resourceUri is only for hard-cap overflow."New value: +"Page size (default: 1000). Continue with nextCursor; an incomplete first page also carries resourceUri for the whole list."
  3. Addedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the agent knows this is a safe read operation. The description adds valuable behavioral context: pagination via nextCursor, snapshot expiration (~60s), and the resourceUri on incomplete first pages. It also explains maxDepth semantics. This goes beyond the annotations and helps the agent understand the tool's behavior.

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?

The description is compact and front-loaded with the core purpose. The first sentence states what the tool does, and the following sentences add key behavioral details. It's efficient, though the pagination details could be slightly more structured. No wasted words.

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 read-only listing tool with 100% schema coverage and no output schema, the description covers the essential behavior: pagination, snapshot expiration, and depth semantics. It doesn't describe the exact output format of the ASCII tree, but the description says 'ASCII tree' and the tool is a list operation, so an agent can infer the return. The snapshot expiration and resourceUri details are valuable context that make it complete enough.

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%, so the schema already documents all 6 parameters. The description adds some value by explaining pagination behavior (nextCursor, resourceUri) and maxDepth semantics, but most parameter meaning is already in the schema. Baseline 3 is appropriate.

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?

The description states a specific verb and resource: 'List sorted directory entries and an ASCII tree.' It also clarifies the tool's scope (directory listing) and distinguishes it from siblings like read, find_files, and search_text. The mention of maxDepth=1 as top-level and pagination behavior makes the purpose concrete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use this tool: to list directory entries and an ASCII tree. It doesn't explicitly name alternatives or exclusions, but the sibling list and the description's focus on directory listing imply when it's appropriate. It could be improved by explicitly saying 'use read for file contents, find_files for searching' but the context is clear.

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