Skip to main content
Glama

Serena

by oraios

list_dir

Retrieve files and directories within a specified path using JSON output, with options for recursive scanning and output length control on Serena's MCP server.

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

NameRequiredDescriptionDefault
max_answer_charsNoIf the output is longer than this number of characters, no content will be returned. Don't adjust unless there is really no other way to get the content required for the task.
recursiveYesWhether to scan subdirectories recursively.
relative_pathYesThe relative path to the directory to list; pass "." to scan the project root.

Input Schema (JSON Schema)

{ "properties": { "max_answer_chars": { "default": 200000, "description": "If the output is longer than this number of characters,\nno content will be returned. Don't adjust unless there is really no other way to get the content\nrequired for the task.", "title": "Max Answer Chars", "type": "integer" }, "recursive": { "description": "Whether to scan subdirectories recursively.", "title": "Recursive", "type": "boolean" }, "relative_path": { "description": "The relative path to the directory to list; pass \".\" to scan the project root.", "title": "Relative Path", "type": "string" } }, "required": [ "relative_path", "recursive" ], "title": "applyArguments", "type": "object" }

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/oraios/serena'

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