Answer: To list directory contents with Gemini CLI's list_directory tool, provide the required `dir_path` argument (absolute or relative path to the directory); optionally add `ignore` glob patterns to exclude and `file_filtering_options` for .gitignore and .geminiignore compliance. Status: Confirmed Entry: tool/gemini-cli/features/list-directory-tool Revision: 1 Digest: sha256:f556f9d83bb1c61b (changes whenever the content changes) Timeline: Created: 2026-11-13T03:19:05Z Last changed: 2026-11-13T03:19:05Z Last verified: 2026-11-20T12:54:04Z Next check: 2026-11-21T12:54:04Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Tool name | list_directory | [1] | 2026-11-20 Required argument | dir_path | [1] | 2026-11-20 Optional argument | ignore | [1] | 2026-11-20 Function | Lists the names of files and subdirectories directly within a specified path. | [1] | 2026-11-20 Sources: [1] Google. "File system tools reference". https://geminicli.com/docs/tools/file-system.md Role: primary. Accessed: 2026-11-20T12:54:04Z Quote: "**Tool name:** `list_directory`" (Supports: Tool name) Quote: "`dir_path` (string, required): Absolute or relative path to the directory." (Supports: Required argument) Quote: "`ignore` (array, optional): Glob patterns to exclude." (Supports: Optional argument) Quote: "Lists the names of files and subdirectories directly within a specified path." (Supports: Function) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 26869070917607d0bd8448fafc887e23390b38af58036b6bcf4fc81721db53f9 (captured 2026-11-13T03:19:04Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:19:05Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:54:04Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:54:04Z Last attempt: 2026-11-20T12:54:04Z Notes and limitations: Extracted automatically from a single official source (section "`list_directory` (ReadFolder)"). Related: https://latestn.com/tool/gemini-cli/features/list-themes What themes are available in Gemini CLI? https://latestn.com/tool/gemini-cli/features/manage-background-processes How does Gemini CLI handle background processes and active shells? https://latestn.com/tool/gemini-cli/features/notification-types What types of notifications does Gemini CLI send? https://latestn.com/tool/gemini-cli/features/internal-docs-arguments What argument does the get_internal_docs tool take in Gemini CLI? https://latestn.com/tool/gemini-cli/features/internal-docs-purpose What does the get_internal_docs tool do in Gemini CLI? https://latestn.com/tool/gemini-cli/features/invoke-internal-docs-manually Can I manually invoke the get_internal_docs tool in Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:19:05Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/features/list-directory-tool/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/features/list-directory-tool POST: https://latestn.com/dispute/tool/gemini-cli/features/list-directory-tool with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/features/list-directory-tool?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I list directory contents with Gemini CLI's list_directory tool? Revision 1, last verified 2026-11-20T12:54:04Z. https://latestn.com/tool/gemini-cli/features/list-directory-tool (accessed 2026-11-21T09:53:51Z). @misc{LatestN_tool_gemini_cli_features_list_directory_tool_r1, title = {How do I list directory contents with Gemini CLI's list_directory tool?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/features/list-directory-tool}}, note = {Revision 1; digest sha256:f556f9d83bb1c61b; last verified 2026-11-20T12:54:04Z; accessed 2026-11-21T09:53:51Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/features/list-directory-tool