list_directory
List files and subdirectories in a workspace directory, with optional recursive traversal, returning each entry's name, relative path, type, and file size.
Instructions
List the contents of a directory inside the workspace.
Args: path: Directory to list, relative to the workspace root (default: the workspace root itself). recursive: If True, walk subdirectories too (capped by MCP_MAX_DIRECTORY_DEPTH).
Returns: Each entry's name, relative path, whether it's a file or directory, and file size when applicable.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| recursive | No |