FormingRulescodexpublished fresh until

MCP filesystem: which directory-listing tool should I use?

Summary As of November 2026, use list_directory for names and types and list_directory_with_sizes for sizes or size sorting; the descriptions were clarified in filesystem 2.3.0 (checked 2026-11-15). For recursion, use directory_tree

Not for MCP filesystem server schema failures in OpenAI Agents SDK; see mcp-filesystem-server-openai-agents-sdk-zod

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ARules · v1.0.0Filesystem listing selection rules
How you use itAlways on in your project
What it can dowrites files
What's inside
ARules · v1.0.0Filesystem listing selection rules
How you use it
Always on in your project
What it can do
writes files
What's inside

What this thread does

Choose list_directory for names and types, list_directory_with_sizes for size information, and directory_tree for a recursive view.

Do first: call list_directory with path set to an allowed directory for a flat inventory of names and types.

As of November 2026; checked 2026-11-05. The maintainers add optional depth to directory_tree in filesystem 2.2.0, so the recursive option below can be bounded (v2.3.0).

Choose by the requested output

NeedToolArguments
Immediate entries onlylist_directorypath
Immediate entries with sizes and totalslist_directory_with_sizespath; optional sortBy
Size-ordered entrieslist_directory_with_sizespath, sortBy: "size"
Nested structuredirectory_treepath; optional excludePatterns, and depth in filesystem 2.2.0

The official filesystem README documents these outputs and marks the listing tools read-only. Checked 2026-10-28. Size listing is not a recursive disk-usage report.

If the agent keeps hesitating, add this instruction to its existing project guidance:

For a flat directory inventory, request names and types. Request sizes only when needed; use size sorting for a largest-entry question. Request a tree for nested structure. Stay within the server's allowed directories.

This is suggested guidance, not a tested routing guarantee. Verify the actual called tool and returned fields on a harmless directory.

Public evidence

cliffhall, project member, 2026-10-19, issue #5071: “this is description quality rather than a demonstrated misfire”. The report concerns overlapping descriptions; it does not establish that models consistently select the wrong tool.

Not for: filesystem schema validation failures.

Limits

No MCP server or agent experiment was run. The issue closed on 2026-11-05 through PR #5460; the description changes shipped in filesystem 2.3.0 in November 2026 (release). The table follows the current README; confirm the schema your installed server actually exposes. No release upgrade is prescribed.

Started from a post by @nomunomu0504, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in model context protocol

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# MCP filesystem: which directory-listing tool should I use?
Summary: As of November 2026, use list_directory for names and types and list_directory_with_sizes for sizes or size sorting; the descriptions were clarified in filesystem 2.3.0 (checked 2026-11-15). For recursion, use directory_tree

## Options
- A · Filesystem listing selection rules · early, no verdict yet · writes files
Copy for agent
get the whatworks thread mcp-filesystem-choose-directory-listing-tool and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-filesystem-choose-directory-listing-tool

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Filesystem listing selection rules

An original CC0-1.0 inline Markdown rules file derived from this thread, with an evaluation checklist. Installation only writes text; no dependencies or service calls. Agent installation and output behavior are untested.

Format
Rules
Source
—
Pinned
v1.0.0 · sha256:bdf54
Content hash
bdf54e7bc3b0a232
Audit
scan passed
Can do
writes files
Works with
codex
Check
Verifies the exact installed file and evaluation checklist; does not establish runtime behavior or output quality.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-filesystem-listing-rules before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp