Skip to main content
Glama

list_dir

Browse and retrieve file and directory listings from a specified path, with options for recursive scanning and filtering ignored files.

Instructions

Lists files and directories in the given directory (optionally with recursion). Returns a JSON object with the names of directories and files within the given directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relative_pathYesThe relative path to the directory to list; pass "." to scan the project root.
recursiveYesWhether to scan subdirectories recursively.
skip_ignored_filesNoWhether to skip files and directories that are ignored.
max_answer_charsNoIf the output is longer than this number of characters, no content will be returned. -1 means the default value from the config will be used. Don't adjust unless there is really no other way to get the content required for the task.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisgreenx-ctrl/serena'

If you have feedback or need assistance with the MCP directory API, please join our Discord server